diff options
| author | Bert Münnich <ber.t@posteo.de> | 2017-10-28 13:16:20 +0200 |
|---|---|---|
| committer | Bert Münnich <ber.t@posteo.de> | 2017-10-28 13:16:20 +0200 |
| commit | 266dac97fd1cbd2e14cf7a9ca0fda4e446c75e3c (patch) | |
| tree | d121d514f43a766ad82956fdafb31b3dd3ad98f2 /trip.rc | |
| parent | 775b775240d09fe665efaecf2432d590567e68ef (diff) | |
Add test for issue #40, exit status of -e with failed backquote or pipeline
Diffstat (limited to 'trip.rc')
| -rw-r--r-- | trip.rc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -614,3 +614,13 @@ if (! ~ $X YYY) { A=``($nl){ $rc -c 'mkdir / >[2=1] | tr a-z A-Z' } B=``($nl){ $rc -c '>[2=1] mkdir / | tr a-z A-Z' } ~ $A $B || fail counter intuitive redirection bug, $A '!=' $B + +# test for github issue #40 +$rc -ec 'false | false' +if (~ $status 0) { + fail '"rc -e" exits with zero status when command in pipeline returns non-zero' +} +$rc -ec 'X=`{false}' +if (~ $status 0) { + fail '"rc -e" exits with zero status when backquote command returns non-zero' +} |