From 9a2fbf6f4854b1f2cfd5979b91d5b3d7e183d487 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 3 Sep 2025 19:03:48 +0900 Subject: test: merge test scripts --- tests/test_compiler_output.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_compiler_output.sh (limited to 'tests/test_compiler_output.sh') 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 + -- cgit v1.2.3-70-g09d2