Assignment-1/test.sh

10 lines
305 B
Bash
Executable File

flex python.flx && gcc lex.yy.c
mkdir -p real_output
mkdir -p diff_results
for file in $(ls testing_code); do
name=$(echo $file | awk -F'[.]' '{print $1}')
./a.out < testing_code/$file > real_output/$name.out
diff example_output/$name.out real_output/$name.out > diff_results/$name.diff
done