aboutsummaryrefslogtreecommitdiff
blob: 376b3399302ab325775afff26d41aaeedbb2d438 (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
#!/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 -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