diff options
Diffstat (limited to 'test_lexer.sh')
-rwxr-xr-x | test_lexer.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test_lexer.sh b/test_lexer.sh new file mode 100755 index 0000000..6093816 --- /dev/null +++ b/test_lexer.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# script to test the lexer + +echo "========================================" +echo " Cleaning the temporaries and outputs" +make clean +echo " Force building lexer" +make bin/c_lexer -B + +if [[ "$?" -ne 0 ]]; then + echo "Build failed."; +fi + +echo "=========================================" +echo " Testing lexer" + +cpp test/test_lex.c test/pre_processed_test_lex.c +#cat test/pre_processed_test_lex.c | ./bin/c_lexer | tee test/output.json +cat test/test_lex.c | ./bin/c_lexer | tee test/output.json |