File: env_values.txt

package info (click to toggle)
golang-github-rogpeppe-go-internal 1.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,184 kB
  • sloc: makefile: 6
file content (27 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (2)
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