From d91207624062184c45d75951638655b240311f18 Mon Sep 17 00:00:00 2001 From: vht24 <vht24@tux1.cci.drexel.edu> Date: Thu, 20 Feb 2025 23:54:51 -0500 Subject: [PATCH] more test --- 4-ShellP2/bats/student_tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/4-ShellP2/bats/student_tests.sh b/4-ShellP2/bats/student_tests.sh index 81029e9..d1b8315 100755 --- a/4-ShellP2/bats/student_tests.sh +++ b/4-ShellP2/bats/student_tests.sh @@ -122,3 +122,11 @@ EOF [ "$stripped_output" = "$expected_output" ] rm testfile } + +# Test: Check handling of SIGINT (Ctrl+C) +@test "Check SIGINT handling" { + run timeout 2 ./dsh <<EOF +sleep 5 +EOF + [ "$status" -ne 0 ] +} \ No newline at end of file -- GitLab