diff --git a/runtests.sh b/runtests.sh index 8d72a95b..1c8adc9d 100755 --- a/runtests.sh +++ b/runtests.sh @@ -101,9 +101,9 @@ function generate_expected_output() echo "A lot of output hidden..." else ( - (grep -onH '# Warning: .*' $joufile || true) | sed -E s/'(.*):([0-9]*):# Warning: '/'compiler warning for file "\1", line \2: '/ - (grep -onH '# Error: .*' $joufile || true) | sed -E s/'(.*):([0-9]*):# Error: '/'compiler error in file "\1", line \2: '/ - (grep -oE '# Output:.*' $joufile || true) | sed -E s/'^# Output: ?'// + (grep --binary-files=text -onH '# Warning: .*' $joufile || true) | sed -E s/'(.*):([0-9]*):# Warning: '/'compiler warning for file "\1", line \2: '/ + (grep --binary-files=text -onH '# Error: .*' $joufile || true) | sed -E s/'(.*):([0-9]*):# Error: '/'compiler error in file "\1", line \2: '/ + (grep --binary-files=text -oE '# Output:.*' $joufile || true) | sed -E s/'^# Output: ?'// ) | sed "s,,$joudir,g" | sed "s,,$jouexe,g" fi echo "Exit code: $correct_exit_code" diff --git a/tests/other_errors/source_file_contain_zero_byte.jou b/tests/other_errors/source_file_contain_zero_byte.jou new file mode 100644 index 00000000..e29ffbcb Binary files /dev/null and b/tests/other_errors/source_file_contain_zero_byte.jou differ