diff options
Diffstat (limited to 'tests/test_compiler_output.sh')
| -rw-r--r-- | tests/test_compiler_output.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_compiler_output.sh b/tests/test_compiler_output.sh new file mode 100644 index 0000000..6993c36 --- /dev/null +++ b/tests/test_compiler_output.sh @@ -0,0 +1,17 @@ +cat > foo.c <<'EOF' +int main() {} +EOF + +"$ducc" -o bar.s foo.c +if [[ $? -ne 0 ]]; then + exit 1 +fi +gcc -o a.out bar.s +./a.out "$@" +exit_code=$? + +if [[ $exit_code -ne 0 ]]; then + echo "invalid exit code: $exit_code" >&2 + exit 1 +fi + |
