test: Refactor.
This commit is contained in:
parent
a0ff0853ff
commit
418652bee1
85
check.sh
85
check.sh
|
@ -5,59 +5,66 @@ DIFF=diff
|
|||
SHELL=${SHELL-bin/gash}
|
||||
|
||||
tests="
|
||||
assign
|
||||
assign2
|
||||
for
|
||||
for-split-sequence
|
||||
find
|
||||
if2
|
||||
iohere
|
||||
list
|
||||
ls
|
||||
nesting
|
||||
pipe
|
||||
pipe-3
|
||||
substitution
|
||||
00-exit
|
||||
01-exit-0
|
||||
02-exit-1
|
||||
|
||||
03-echo
|
||||
03-echo-nesting
|
||||
03-echo-escaped-doublequotes
|
||||
03-echo-quoted-doublequotes
|
||||
|
||||
04-echo-var
|
||||
05-assignment-doublequoted-doublequotes
|
||||
04-echo-equal
|
||||
|
||||
05-assignment
|
||||
05-assignment-empty
|
||||
05-assignment-echo
|
||||
05-assignment-empty
|
||||
05-assignment-singlequote
|
||||
05-assignment-double-quote
|
||||
05-assignment-variable-word
|
||||
09-compound-word
|
||||
0a-assign-substitute
|
||||
0b-command-compound-word
|
||||
05-assignment-word-variable
|
||||
05-assignment-doublequoted-doublequotes
|
||||
|
||||
06-compound-word
|
||||
06-command-compound-word
|
||||
|
||||
10-if
|
||||
11-if-false
|
||||
10-if-false
|
||||
10-if-word-variable
|
||||
11-for
|
||||
11-for-split-sequence
|
||||
|
||||
20-semi.sh
|
||||
20-pipe-exit-0
|
||||
21-pipe-exit-1
|
||||
22-semi-pipe-exit-0
|
||||
30-assignment-substitution
|
||||
30-eval
|
||||
31-eval-echo-variable
|
||||
32-for-substitute
|
||||
33-string-args
|
||||
35-assignment-eval-echo
|
||||
20-pipe-exit-1
|
||||
20-pipe-sed
|
||||
|
||||
00-sed
|
||||
00-sed-once
|
||||
00-sed-global
|
||||
00-sed-case
|
||||
00-sed-group
|
||||
00-sed-group-extended
|
||||
00-sed-twice
|
||||
00-sed-undo
|
||||
30-substitution
|
||||
30-substitution-backtick
|
||||
30-substitution-assignment
|
||||
30-for-substitution
|
||||
|
||||
00-tar
|
||||
00-tar-Z
|
||||
00-tar-Z-old
|
||||
00-tar-Z-pipe
|
||||
40-eval
|
||||
40-eval-echo-variable
|
||||
40-assignment-eval-echo.sh
|
||||
|
||||
50-iohere
|
||||
|
||||
100-sed
|
||||
100-sed-once
|
||||
100-sed-global
|
||||
100-sed-case
|
||||
100-sed-group
|
||||
100-sed-group-extended
|
||||
100-sed-twice
|
||||
100-sed-undo
|
||||
100-sed-file
|
||||
|
||||
100-tar
|
||||
100-tar-Z
|
||||
100-tar-Z-old
|
||||
100-tar-Z-pipe
|
||||
"
|
||||
|
||||
broken="
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
echo foo "bar" \"baz\"
|
|
@ -0,0 +1 @@
|
|||
foo bar "baz"
|
|
@ -0,0 +1 @@
|
|||
echo foo "bar" '"baz"'
|
|
@ -0,0 +1 @@
|
|||
foo bar "baz"
|
|
@ -0,0 +1 @@
|
|||
echo a=$a
|
|
@ -0,0 +1 @@
|
|||
a=
|
|
@ -1,5 +1,4 @@
|
|||
#set -x
|
||||
aliaspath=alias
|
||||
localedir=x
|
||||
localedir=locale
|
||||
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\""
|
||||
echo cc $defines
|
||||
|
|
|
@ -1 +1 @@
|
|||
cc -DALIASPATH="alias" -DLOCALEDIR="x"
|
||||
cc -DALIASPATH="alias" -DLOCALEDIR="locale"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
a=
|
||||
echo a=$a
|
||||
echo a:$a
|
||||
|
|
|
@ -1 +1 @@
|
|||
a=
|
||||
a:
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
libdir=${exec_prefix}/lib
|
||||
SHELL=gash
|
||||
bin=${SHELL}/bin
|
||||
echo $bin
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
gash/bin
|
|
@ -0,0 +1,3 @@
|
|||
SHELL=gash
|
||||
PATH=bin:${SHELL}
|
||||
echo $PATH
|
|
@ -0,0 +1 @@
|
|||
bin:gash
|
|
@ -0,0 +1,4 @@
|
|||
if [ x"$y" = x ]; then
|
||||
exit 0
|
||||
fi
|
||||
exit 1
|
|
@ -0,0 +1 @@
|
|||
\sed s,foo,bar, test/data/foo
|
|
@ -0,0 +1,3 @@
|
|||
bar
|
||||
bar
|
||||
baz
|
|
@ -0,0 +1,3 @@
|
|||
0
|
||||
1
|
||||
2
|
|
@ -0,0 +1,3 @@
|
|||
for file in `echo foo.o bar.o`; do
|
||||
echo compiling $file...
|
||||
done
|
|
@ -0,0 +1,2 @@
|
|||
compiling foo.o...
|
||||
compiling bar.o...
|
|
@ -0,0 +1 @@
|
|||
b=test/test
|
|
@ -0,0 +1 @@
|
|||
echo `echo 1 2 3`
|
|
@ -0,0 +1 @@
|
|||
1 2 3
|
|
@ -0,0 +1 @@
|
|||
echo $(echo 1 2 3)
|
|
@ -0,0 +1 @@
|
|||
1 2 3
|
|
@ -1,3 +0,0 @@
|
|||
for file in `echo ar.o arscan.o`; do
|
||||
echo compiling $file...
|
||||
done
|
|
@ -1,2 +0,0 @@
|
|||
compiling ar.o...
|
||||
compiling arscan.o...
|
|
@ -1 +0,0 @@
|
|||
echo foo "bar" '"baz"' \"bla\"
|
|
@ -1 +0,0 @@
|
|||
exec_prefix=`eval echo ${prefix}`
|
|
@ -0,0 +1,3 @@
|
|||
foo=bar
|
||||
baz=`eval echo ${foo}`
|
||||
echo $baz
|
|
@ -0,0 +1 @@
|
|||
bar
|
|
@ -1,2 +1,3 @@
|
|||
bar=SHELL
|
||||
foo=baz
|
||||
bar=foo
|
||||
eval echo '$'$bar
|
|
@ -0,0 +1 @@
|
|||
baz
|
|
@ -0,0 +1 @@
|
|||
0
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
ALLOCA=''
|
|
@ -1,3 +0,0 @@
|
|||
defines="-DALIASPATH=\"${aliaspath}\" -"
|
||||
echo defines:$defines
|
||||
|
|
@ -1 +0,0 @@
|
|||
find test -type f
|
|
@ -1,3 +0,0 @@
|
|||
if [ x"$y" != x ]; then
|
||||
echo "boo"
|
||||
fi
|
|
@ -1 +0,0 @@
|
|||
echo *e*a*;echo *r?p*;echo *;echo [a-l]*[m-z]*; echo;
|
|
@ -1 +0,0 @@
|
|||
ls *
|
|
@ -1,2 +0,0 @@
|
|||
echo $(find test -type f)
|
||||
#echo `find test -type f`
|
Loading…
Reference in New Issue