aboutsummaryrefslogtreecommitdiff
blob: 8b0d724479ffdc88ebe782b120b3b05b04dbfbce (plain)
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
#!/bin/sh

declare -i error=0

./ast_printer -f $srcdir/bashast/features_script/features.sh\
    | diff -u $srcdir/bashast/features_script/features.sh.ast -
error+=$?

./ast_printer -t libbash.tokens -f $srcdir/bashast/features_script/features.sh\
    | diff -u $srcdir/bashast/features_script/features.sh.tokens -
error+=$?

./ast_printer -w libbashWalker.tokens -f $srcdir/bashast/features_script/features.sh\
    | diff -u $srcdir/bashast/features_script/features.sh.walker.tokens -
error+=$?

./ast_printer -t libbash.tokens -f $srcdir/scripts/illegal_script.sh\
    | diff -u $srcdir/scripts/illegal_script.sh.tokens -
error+=$?

./ast_printer -f $srcdir/bashast/features_script/illegal_script.sh 2 > /dev/null
if [[ $? == 0 ]]
then
    error+=1
fi

./ast_printer -e "case" 2 > /dev/null
if [[ $? == 0 ]]
then
    error+=1
fi

exit $error