test: Update test suite.
This commit is contained in:
parent
1f9480cda1
commit
6203f8cf07
10
check.sh
10
check.sh
|
@ -16,6 +16,7 @@ list
|
|||
ls
|
||||
nesting
|
||||
pipe
|
||||
pipe-3
|
||||
substitution
|
||||
00-exit
|
||||
01-exit-0
|
||||
|
@ -24,10 +25,11 @@ substitution
|
|||
04-echo-var
|
||||
05-assignment-doublequoted-doublequotes
|
||||
05-assignment
|
||||
06-assignment-echo
|
||||
06-assignment-singlequote
|
||||
07-assignment-double-quote
|
||||
08-assignment-variable-word
|
||||
05-assignment-empty
|
||||
05-assignment-echo
|
||||
05-assignment-singlequote
|
||||
05-assignment-double-quote
|
||||
05-assignment-variable-word
|
||||
09-compound-word
|
||||
0a-assign-substitute
|
||||
0b-command-compound-word
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
(command (cons program (cdr command))))
|
||||
(or (builtin command #:prefer-builtin? (or %prefer-builtins?
|
||||
escape-builtin?))
|
||||
(cut apply (compose status:exit-val system*) command))))
|
||||
(lambda _ (status:exit-val (apply system* command))))))
|
||||
(else (lambda () #t))))
|
||||
(exec (append-map glob args)))
|
||||
|
||||
|
@ -118,9 +118,7 @@
|
|||
(string-join (append-map glob o) ""))
|
||||
|
||||
(define (sequence . args)
|
||||
(format (current-error-port) "sequence args=~s\n" args)
|
||||
(let ((glob (append-map glob (apply append args))))
|
||||
(format (current-error-port) " => sequence glob=~s\n" glob)
|
||||
glob))
|
||||
|
||||
(define (run ast)
|
||||
|
|
2
test.sh
2
test.sh
|
@ -8,7 +8,7 @@ SHELL=${SHELL-bin/gash}
|
|||
t=$1
|
||||
b=test/$(basename $t .sh)
|
||||
set +e
|
||||
$SHELL -e $b.sh > $b.1 2> $b.2
|
||||
timeout 1 $SHELL -e $b.sh > $b.1 2> $b.2
|
||||
r=$?
|
||||
set -e
|
||||
if [ -f $b.exit ]; then
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
cc -DALIASPATH="alias" -DLOCALEDIR="x"
|
|
@ -0,0 +1,2 @@
|
|||
a=
|
||||
echo a=$a
|
|
@ -0,0 +1 @@
|
|||
a=
|
|
@ -0,0 +1 @@
|
|||
cc -c ./
|
|
@ -1,2 +1,3 @@
|
|||
obj=ar.o
|
||||
objs="$objs `basename $obj`"
|
||||
echo "objs:>$objs<"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
objs:> ar.o<
|
|
@ -0,0 +1 @@
|
|||
-I ar.o
|
|
@ -0,0 +1,2 @@
|
|||
compiling ar.o...
|
||||
compiling arscan.o...
|
|
@ -1,5 +1,4 @@
|
|||
one=1
|
||||
two_n_halve=
|
||||
for i in 0 $one 2 $two_n_halve 3 ""; do
|
||||
for i in 0 $one 2 $two_n_halve $two_n_quaaar and 3 ""; do
|
||||
echo $i;
|
||||
done
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
0
|
||||
1
|
||||
2
|
||||
and
|
||||
3
|
||||
|
|
@ -0,0 +1 @@
|
|||
foobar
|
|
@ -0,0 +1 @@
|
|||
foo "bar"
|
|
@ -0,0 +1 @@
|
|||
echo -e 'a\nb\nc' test/data/star/* | sed 's, ,\n,g' | cat
|
|
@ -0,0 +1,7 @@
|
|||
a
|
||||
b
|
||||
c
|
||||
test/data/star/0
|
||||
test/data/star/1
|
||||
test/data/star/2
|
||||
test/data/star/3
|
|
@ -1 +1 @@
|
|||
echo -e 'a\nb\nc' * | sed 's, ,\n,g' | cat
|
||||
echo -e 'a\nb\nc' test/data/star/* | \sed 's, ,\n,g'
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
a
|
||||
b
|
||||
c
|
||||
test/data/star/0
|
||||
test/data/star/1
|
||||
test/data/star/2
|
||||
test/data/star/3
|
Loading…
Reference in New Issue