diff --git a/4-ShellP2/bats/student_tests.sh b/4-ShellP2/bats/student_tests.sh index 81029e9cc03fa5a7e4552be2be5607ad99509972..d1b8315e6ecc77342c73746b832b986869eccb45 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