forked from pclewis/lslint
-
Notifications
You must be signed in to change notification settings - Fork 13
/
test.sh
executable file
·53 lines (50 loc) · 1.66 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
failed=.
if [ -e ./test.total.txt ] ; then
rm -f ./test.total.txt
fi
for f in scripts/*.lsl scripts/*/*.lsl ; do
printf "%40s ... " "$f"
if [ "${f#scripts/mono/}" != "$f" ] ; then
./lslint -m -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/lso/}" != "$f" ] ; then
./lslint -m- -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/preproc/}" != "$f" ] ; then
./lslint -i -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/uep/}" != "$f" ] ; then
./lslint -u -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/switch/}" != "$f" ] ; then
./lslint -w -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/lazylist/}" != "$f" ] ; then
./lslint -z -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/fn_overr/}" != "$f" ] ; then
./lslint -F -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/lz_overr/}" != "$f" ] ; then
./lslint -zF -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/godmode/}" != "$f" ] ; then
./lslint -G -\# -A "$f" > ./test.run.txt 2>&1
elif [ "${f#scripts/todo/}" != "$f" ] ; then
true # skip these tests
else
# test in both mono and lso modes
./lslint -m -\# -A "$f" > ./test.run.txt 2>&1 \
&& ./lslint -m- -\# -A "$f" > ./test.run.txt 2>&1
fi
if [ $? != 0 ] ; then
echo "FAILED"
echo "" >> ./test.total.txt
echo "****************" >> ./test.total.txt
echo '***>' "$f" >> ./test.total.txt
echo "" >> ./test.total.txt
cat ./test.run.txt >> ./test.total.txt
failed=$failed.
else
echo "passed"
fi
done
rm -f ./test.run.txt
if [ $failed != . ] ; then
cat ./test.total.txt
rm -f ./test.total.txt
exit 1
fi