Lines Matching +full:a +full:- +full:z

1 #-
2 # Copyright (c) 2005 - Garance Alistair Drosehn <gad@FreeBSD.org>.
16 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
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
69 script:/bin/echo A-${PATH}-Z
71 stderr:[%-testpgm.basename-%]: sh: No such file or directory
74 sb_args:-S -P/bin sh
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
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
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
219 # For a short time `env' was changed to recognize 'something=value' as a
220 # valid utility name if 'something' begins with a '/'. However, that was
221 # a bad idea, since variable-names with a '/' -- while rare -- are still
222 # more blessed by standards than a filename with an '=' in it. So, this
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
245 stdout:WASTEST=Global-TV-Value
248 # Had a bug with ${VAR} expansion if the character before the $ was
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:
284 stdout:....$6 = [ 16] '/tmp/env-regress'
287 sb_args:-S/bin/sh [%-script.pathname-%] userB "${TNADA}" scriptname:
301 stdout:....$4 = [ 16] '/tmp/env-regress'
304 sb_args:-S/bin/sh [%-script.pathname-%] userA ${TNADA} scriptname:
317 stdout:....$3 = [ 16] '[%-script.pathname-%]'
320 sb_args:-S/bin/sh [%-script.pathname-%] ${A} ${NB} ${C} ${ND} ${NE} ${F} S:
321 setenv:A=A_ThisisAlongstring_A1
340 stdout:....$5 = [ 16] '/tmp/env-regress'
343 sb_args:-S/bin/sh [%-script.pathname-%] ${A} ${NB} "${NB}" ${NB} ${C} "${ND}" ${NE} ${F} S:
344 setenv:A=A_ThisisAlongstring_A1
365 stdout:....$7 = [ 16] '/tmp/env-regress'
369 sb_args:-S/bin/echo ${A} ${B} ${C} ${D} ScriptName:
370 setenv:A=A_ThisisAlongstring_A1
374 …hisisAlongstring_B1 C_ThisisAlongstring_C1 D_ThisisAlongstring_D1 ScriptName: [%-script.pathname-%]
377 sb_args:-S/bin/echo ${A} "${B}" ${C} "${D}" ScriptName:
378 setenv:A=A_ThisisAlongstring_A1
382 …hisisAlongstring_B1 C_ThisisAlongstring_C1 D_ThisisAlongstring_D1 ScriptName: [%-script.pathname-%]
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