1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
# Test that passing env values, e.g. ENV1=val, works
unquote test.txt
env BLAH1=
env BLAH2=junk
# Normal operation
testscript -e BLAH1=rubbish -e BLAH2 test.txt
# It is an error to specify WORK. Note the error message
# appears on stdout because it is written to the log output
# of testscript, which has no concept of stderr.
! testscript -e BLAH1=rubbish -e BLAH2 -e WORK test.txt
stdout 'cannot override WORK variable'
-- test.txt --
>exec printf $BLAH1'\n'
>cmp stdout stdout1.txt
>
>exec printf $BLAH2'\n'
>cmp stdout stdout2.txt
>
>-- stdout1.txt --
>rubbish
>-- stdout2.txt --
>junk
|