From 1c44079167dbac07e71e177b3ef125755c4308fc Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 3 May 2025 13:52:49 +0900 Subject: refactor tests --- tests/001.sh | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'tests/001.sh') diff --git a/tests/001.sh b/tests/001.sh index a81f2c3..00e0aca 100644 --- a/tests/001.sh +++ b/tests/001.sh @@ -1,21 +1,5 @@ -cat <<'EOF' > main.c +bash ../../test_exit_code.sh 42 <<'EOF' int main() { return 42; } EOF - -"$p4dcc" < main.c > main.s -if [[ $? -ne 0 ]]; then - cat main.s >&2 - exit 1 -fi -gcc -Wl,-z,noexecstack -o a.out main.s -./a.out -exit_code=$? - -expected=42 - -if [[ ! $exit_code -eq $expected ]]; then - echo "expected $expected, but $exit_code" >&2 - exit 1 -fi -- cgit v1.2.3-70-g09d2