bash_unit
bash_unit copied to clipboard
fake with here docs will interpret quote too much
When using quotes inside here doc in the context of fake, the quote will disappear from the output of the faked function. This is different from what is expected from using here doc.
Here is an exemple:
test_should_succeed_but_will_fail() {
fake toto <<EOF
"test"
EOF
assert 'toto | grep \"' 'should have found quote but seems like fake swallowed it'
}
test_will_succeed() {
fake toto <<EOF
\"test\"
EOF
assert 'toto | grep \"'
}