We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb3b65e commit bcda5eeCopy full SHA for bcda5ee
tests/trap.bats
@@ -36,6 +36,13 @@ load './util/init.sh'
36
[ "${___global_trap_table___[USR1]}" = $'\x1Csomefunction\x1Csomefunction2' ]
37
}
38
39
+@test "core.trap_remove fails when function specified does not exist" {
40
+ run core.trap_remove 'nonexistent' 'USR1'
41
+
42
+ assert_failure
43
+ assert_output -p "Function 'nonexistent' is not defined"
44
+}
45
46
@test "core.trap_remove removes trap function properly 1" {
47
somefunction() { :; }
48
core.trap_add 'somefunction' 'USR1'
0 commit comments