aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2011-06-20 17:52:21 +0800
committerMu Qiao <qiaomuf@gentoo.org>2011-06-22 19:52:27 +0800
commit6db29285fb16aea68a9d2527fe9cfd4e1918b247 (patch)
tree7e8a43f27de4427a1026786880b38a4e320f9075 /test
parentWalker: support -a and -o in built-in test (diff)
downloadlibbash-6db29285fb16aea68a9d2527fe9cfd4e1918b247.tar.gz
libbash-6db29285fb16aea68a9d2527fe9cfd4e1918b247.tar.bz2
libbash-6db29285fb16aea68a9d2527fe9cfd4e1918b247.zip
Utility: support printing tokens received by walker
It's helpful if ast_printer can print tokens received by walker grammar. Now this is supported with the -w option.
Diffstat (limited to 'test')
-rwxr-xr-xtest/ast_printer_test.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ast_printer_test.sh b/test/ast_printer_test.sh
index e0c930f..376b339 100755
--- a/test/ast_printer_test.sh
+++ b/test/ast_printer_test.sh
@@ -10,6 +10,10 @@ error+=$?
| 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