Closed ony closed 7 years ago
Cf #501.
Ah, thanks for this. I see there is a wrong use of echo in several tests, better to use printf consistently. I haven't yet discovered why the tests pass on my machine and travis's though; there is something peculiar going on with hledger or shelltestrunner which needs explaining.
I believe 9d33fbe should resolve this, making the tests pass on your machine as well.
I've noted a possible shelltestrunner bug for investigation. This fails on my machine, but perhaps it passes on yours, due to different /bin/echo or $SHELL ?
# \n should be passed as-is to echo. Doesn't work on my mac.
echo 'a\nb'
>>>
a\nb
>>>2
>>>=0
Assuming the immediate issue is fixed.
Yep. It works on linux now. Thank you.
Regarding \n
interpretation. GNU version of echo
by default doesn't interpret that character and BSD version from Mac have no support for -e
option at all to interpret backslash specially.
Both under Linux and Mac I can see that zsh
do weird interpretation regardless of quotes style or omitting them at all. I.e. 'a\'n'b'
and 'a\\nb'
both being interpreted and this is so wrong...
But by some reason for
# \n should be passed as-is to echo. Doesn't work on my mac.
echo 'a\nb'
>>>
a\nb
>>>2
>>>=0
zsh
<<<
echo 'a\nb'
>>>
a\nb
>>>2
>>>=0
bash
<<<
echo 'a\nb'
>>>
a\nb
>>>2
>>>=0
I get fail only for second case (zsh
) even that my $SHELL
is /bin/zsh
Travis:
Locally: