Lines Matching +full:stdout +full:- +full:path

1 #-
2 # Copyright (c) 2005 - Garance Alistair Drosehn <gad@FreeBSD.org>.
29 gblenv=PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
30 gblenv=TESTVAR=Global-TV-Value
33 # These first two tests are testing how well the regression-script itself is
34 # handling environment-variables, as much as testing the `env' program.
38 script:/bin/echo A-${TESTVAR}-Z
39 stdout:A-a1a-Z
42 sb_args:-S /bin/sh
43 script:/bin/echo A-${TESTVAR}-Z
44 stdout:A-Global-TV-Value-Z
48 sb_args:-S TESTVAR=bb22bb /bin/sh
49 script:/bin/echo A-${TESTVAR}-Z
50 stdout:A-bb22bb-Z
53 sb_args:-S\_TESTVAR=ab22ab\_/bin/sh
54 script:/bin/echo A-${TESTVAR}-Z
55 stdout:A-ab22ab-Z
58 sb_args:-S\_TESTVAR="abc\_33\_abc"\_/bin/sh
59 script:/bin/echo A-${TESTVAR}-Z
60 stdout:A-abc 33 abc-Z
64 # we show that it can be found without changing PATH by using -P
65 # And then show that it can be NOT found by using -P...
67 sb_args:-S sh
68 setenv:PATH=/usr/sbin
69 script:/bin/echo A-${PATH}-Z
71 stderr:[%-testpgm.basename-%]: sh: No such file or directory
74 sb_args:-S -P/bin sh
75 setenv:PATH=/usr/sbin
76 script:/bin/echo A-${PATH}-Z
77 stdout:A-/usr/sbin-Z
80 sb_args:-S -P/sbin:/usr/sbin sh
81 script:/bin/echo A-${PATH}-Z
83 stderr:[%-testpgm.basename-%]: sh: No such file or directory
86 # Hmm. I wonder if -P should always set an 'ENV_PATH' variable?
88 sb_args:-S -P/bin:/usr/bin:${PATH} ENV_PATH=/bin:/usr/bin:${PATH} sh
89 setenv:PATH=/usr/sbin
90 script:/bin/echo A-${PATH}-Z
91 script:/bin/echo B-${ENV_PATH}-Y
92 stdout:A-/usr/sbin-Z
93 stdout:B-/bin:/usr/bin:/usr/sbin-Y
96 # Show that the comment-characters are working, both for where they are
99 sb_args:-STESTVAR="abc44abc" /bin/sh # This is some arbitrary text
101 script:/bin/echo A-${TESTVAR}-Z B-$1-Y
102 stdout:A-abc44abc-Z B-us11er-Y
105 sb_args:-STESTVAR="abc55abc" /bin/sh \c This is some arbitrary text
107 script:/bin/echo A-${TESTVAR}-Z B-$1-Y
108 stdout:A-abc55abc-Z B-us11er-Y
111 sb_args:-STESTVAR=abc#44#abc /bin/sh
113 script:/bin/echo A-${TESTVAR}-Z B-$1-Y
114 stdout:A-abc#44#abc-Z B-us11er-Y
117 sb_args:-STESTVAR='abc\c55\cabc' /bin/sh
119 script:/bin/echo A-${TESTVAR}-Z B-$1-Y
120 stdout:A-abc\c55\cabc-Z B-us11er-Y
125 sb_args:-STESTVAR="abc'def" /bin/sh
126 script:/bin/echo A-${TESTVAR}-Z
127 stdout:A-abc'def-Z
130 sb_args:-STESTVAR='abc"def' /bin/sh
131 script:/bin/echo A-${TESTVAR}-Z
132 stdout:A-abc"def-Z
135 sb_args:-STESTVAR='ab\'cd\'ef' /bin/sh
136 script:/bin/echo A-${TESTVAR}-Z
137 stdout:A-ab'cd'ef-Z
140 sb_args:-STESTVAR='abc\"def\'ghi' /bin/sh
141 script:/bin/echo A-${TESTVAR}-Z
142 stdout:A-abc\"def'ghi-Z
145 sb_args:-STESTVAR='abc''def''ghi' /bin/sh
146 script:/bin/echo A-${TESTVAR}-Z
147 stdout:A-abcdefghi-Z
150 sb_args:-STESTVAR='abc\ndef\nghi' /bin/sh
151 script:/bin/echo "A-${TESTVAR}-Z"
152 stdout:A-abc\ndef\nghi-Z
155 sb_args:-STESTVAR="abc\ndef\nghi" /bin/sh
156 script:/bin/echo "A-${TESTVAR}-Z"
157 stdout:A-abc
158 stdout:def
159 stdout:ghi-Z
162 sb_args:-STESTVAR=""\_OTHERVAR=""\_/bin/sh
163 script:/bin/echo A-${TESTVAR}-M-${OTHERVAR}-Z
164 stdout:A--M--Z
167 sb_args:-STESTVAR=no-term-"-dq... /bin/sh
168 script:/bin/echo "A-${TESTVAR}-Z"
170 stderr:[%-testpgm.basename-%]: No terminating quote for string: TESTVAR=no-term-"-dq... /bin/sh
173 sb_args:-STESTVAR=no-term-'-sq... /bin/sh
174 script:/bin/echo "A-${TESTVAR}-Z"
176 stderr:[%-testpgm.basename-%]: No terminating quote for string: TESTVAR=no-term-'-sq... /bin/sh
179 # Some tests of variable-substitution.
181 sb_args:-S TESTVAR=${TEST7} /bin/sh
183 script:/bin/echo "A-${TESTVAR}-Z"
184 stdout:A-a23456a-Z
187 sb_args:-S TESTVAR=${TEST8} /bin/sh
189 script:/bin/echo "A-${TESTVAR}-Z"
190 stdout:A-b234567b-Z
193 sb_args:-S TESTVAR=${TEST9} /bin/sh
195 script:/bin/echo "A-${TESTVAR}-Z"
196 stdout:A-c2345678c-Z
199 sb_args:-S TESTVAR=${TEST8}+${TEST9}+${TEST10} /bin/sh
203 script:/bin/echo "A-${TESTVAR}-Z"
204 stdout:A-a234567z+a2345678z+a23456789z-Z
207 sb_args:-S TESTVAR=$* /bin/sh
208 script:/bin/echo "A-${TESTVAR}-Z"
210 stderr:[%-testpgm.basename-%]: Only ${VARNAME} expansion is supported, error at: $* /bin/sh
213 sb_args:-S TESTVAR=/usr/bin:$PATH /bin/sh
214 script:/bin/echo "A-${TESTVAR}-Z"
216 stderr:[%-testpgm.basename-%]: Only ${VARNAME} expansion is supported, error at: $PATH /bin/sh
221 # a bad idea, since variable-names with a '/' -- while rare -- are still
226 sb_args:-S/tmp/envtest=echo false
230 # Show interactions between -i (clear environment), and ${VAR} substitution,
231 # and that -i will clear the environment at the right point in processing...
233 …sb_args:-iS PATH=/bin:/usr/bin:/Not WASPATH=${PATH} WASOUT=${OUTSIDEVAR} TESTVAR=SbValue WASTEST=$…
238 script:unset -v IFS PS1 PS2 PS4 PPID
239 script:set | grep -Ev '^(OPTIND|PWD)=' | sort
240 stdout:=== set ===
241 stdout:PATH=/bin:/usr/bin:/Not
242 stdout:TESTVAR=SbValue
243 stdout:WASOUT=OutsideValue
244 stdout:WASPATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
245 stdout:WASTEST=Global-TV-Value
249 # one of the argument-separator characters. So the first of the
252 sb_args:-Secho Testv:${TESTV} Scriptname:
254 stdout:Testv:ab/ba Scriptname: [%-script.pathname-%]
257 sb_args:-Secho testV: ${TESTV} scriptname:
259 stdout:testV: cd/dc scriptname: [%-script.pathname-%]
262 # A "nothing variable" inside a quoted string should produce a zero-length
264 # nothing. Note the tricks we play with [%-script.pathname-%] so that we
268 sb_args:-S/bin/sh [%-script.pathname-%] userDQ: "" SQ: '' scriptname:
278 stdout:list_args.sh with $# = 6
279 stdout:....$1 = [ 7] 'userDQ:'
280 stdout:....$2 = [ 0] ''
281 stdout:....$3 = [ 3] 'SQ:'
282 stdout:....$4 = [ 0] ''
283 stdout:....$5 = [ 11] 'scriptname:'
284 stdout:....$6 = [ 16] '/tmp/env-regress'
287 sb_args:-S/bin/sh [%-script.pathname-%] userB "${TNADA}" scriptname:
297 stdout:list_args.sh with $# = 4
298 stdout:....$1 = [ 5] 'userB'
299 stdout:....$2 = [ 0] ''
300 stdout:....$3 = [ 11] 'scriptname:'
301 stdout:....$4 = [ 16] '/tmp/env-regress'
304 sb_args:-S/bin/sh [%-script.pathname-%] userA ${TNADA} scriptname:
314 stdout:list_args.sh with $# = 3
315 stdout:....$1 = [ 5] 'userA'
316 stdout:....$2 = [ 11] 'scriptname:'
317 stdout:....$3 = [ 16] '[%-script.pathname-%]'
320 sb_args:-S/bin/sh [%-script.pathname-%] ${A} ${NB} ${C} ${ND} ${NE} ${F} S:
335 stdout:list_args.sh with $# = 5
336 stdout:....$1 = [ 22] 'A_ThisisAlongstring_A1'
337 stdout:....$2 = [ 22] 'C_ThisisAlongstring_C1'
338 stdout:....$3 = [ 22] 'F_ThisisAlongstring_F1'
339 stdout:....$4 = [ 2] 'S:'
340 stdout:....$5 = [ 16] '/tmp/env-regress'
343 sb_args:-S/bin/sh [%-script.pathname-%] ${A} ${NB} "${NB}" ${NB} ${C} "${ND}" ${NE} ${F} S:
358 stdout:list_args.sh with $# = 7
359 stdout:....$1 = [ 22] 'A_ThisisAlongstring_A1'
360 stdout:....$2 = [ 0] ''
361 stdout:....$3 = [ 22] 'C_ThisisAlongstring_C1'
362 stdout:....$4 = [ 0] ''
363 stdout:....$5 = [ 22] 'F_ThisisAlongstring_F1'
364 stdout:....$6 = [ 2] 'S:'
365 stdout:....$7 = [ 16] '/tmp/env-regress'
369 sb_args:-S/bin/echo ${A} ${B} ${C} ${D} ScriptName:
374stdout:A_ThisisAlongstring_A1 B_ThisisAlongstring_B1 C_ThisisAlongstring_C1 D_ThisisAlongstring_D1…
377 sb_args:-S/bin/echo ${A} "${B}" ${C} "${D}" ScriptName:
382stdout:A_ThisisAlongstring_A1 B_ThisisAlongstring_B1 C_ThisisAlongstring_C1 D_ThisisAlongstring_D1…
387 script:[%-testpgm.pathname-%] -S '\c' >/dev/null
391 script:[%-testpgm.pathname-%] -S'\c' >/dev/null
395 script:[%-testpgm.pathname-%] -u foo -S '\c' >/dev/null
399 script:[%-testpgm.pathname-%] -u foo -S'\c' >/dev/null
403 script:[%-testpgm.pathname-%] -S '-u bar \c' >/dev/null
407 script:[%-testpgm.pathname-%] -S'-u bar \c' >/dev/null
411 script:[%-testpgm.pathname-%] -u foo -S '-u bar \c' >/dev/null
415 script:[%-testpgm.pathname-%] -u foo -S'-u bar \c' >/dev/null