test expr bug with compound expressions

Fri, 20 Apr 2018 18:08:29 EDT
joe9mail@[REDACTED]

Hello,

Below is the behaviour noticed:

cd /tmp; test ‘(’ ! -f junk-does-not-exist -o -f /dev/null ‘)’ && echo ‘test passes’ || echo ‘test fails’ test: ) expected test fails cd /tmp; test ‘(’ ! -f junk-does-not-exist ‘)’ && echo ‘test passes’ || echo ‘test fails’ test passes cd /tmp; test ‘(’ ! -f junk-does-not-exist -o -f /dev/null ‘)’ -a -f /dev/null && echo ‘test passes’ || echo ‘test fails’ test: ) expected test fails cd /tmp; test ‘(’ ! -f does-not-exist ‘)’ && echo ‘test passes’ || echo ‘test fails’ test passes

<aiju> joe9: seems like a bug

Thanks