+++ /dev/null
-#!/bin/sh
-
-beispiel=parser
-allow_null_glob_expansion=1
-shopt -s nullglob
-PROGRAM=./$beispiel
-errnum=0
-prgnum=0
-
-LOC=~/test/$beispiel/
-
-for i in $LOC/*.[012]
-do
- echo "---------------------------------------------------------------------"
- echo "Test file: $i"
- echo "Input:"
- echo "======"
- echo
- cat $i
- echo
- let prgnum=prgnum+1
- $PROGRAM <$i >/dev/null 2>/dev/null
- retval=$?
- if test $retval -eq ${i##*.}
- then
- echo "Correct exit status."
- else
- echo "[Error] Status is $retval but ${i##*.} was expected!"
- echo
- let errnum=errnum+1
- fi
-done
-echo "---------------------------------------------------------------------"
-echo
-let corrnum=prgnum-errnum
-echo "Statistics:"
-echo "==========="
-echo " $prgnum Tests total"
-echo " $corrnum Tests passed"
-echo " $errnum Tests failed"
clean:
rm -f $(PARSER){,.o,.c,.h,.output} $(SCANNER).{c,o}
-1test: clean $(NAME)
- @./09test.sh
+1test: 2test
2test:
/usr/ftp/pub/ublu/test/$(NAME)/test 2>&1
clean:
rm -f $(NAME).o $(NAME) $(NAME).c
-1test: $(NAME)
- @echo "execute cat test/1test | ./$(NAME)"
- @cat test/1test | ./$(NAME) > tmp1
- @echo "execute cat test/2test | ./$(NAME)"
- @cat test/2test | ./$(NAME) > tmp2
- -@diff tmp{1,2}
- @rm tmp{1,2}
+1test: 2test
2test:
/usr/ftp/pub/ublu/test/$(NAME)/test 2>&1