You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/trap.bats
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,9 @@ load './util/init.sh'
6
6
# actual execution of the functions on the signal. There seems to be a limitation
7
7
# of Bats that prevents this from working
8
8
9
+
# The '${___global_trap_table___[nokey]}' is there to ensure that the
10
+
# ___global_trap_table___ is an actual associative array. If '___global_trap_table___' is not an associative array, the index with 'nokey' still returns the value of the variable (no error will be thrown). These were origianlly done when the 'core.init' function was not called within these tests
11
+
9
12
@test "core.trap_add fails when function specified does not exist" {
10
13
run core.trap_add 'nonexistent''USR1'
11
14
@@ -22,17 +25,21 @@ load './util/init.sh'
22
25
23
26
@test "core.trap_add adds trap function properly" {
0 commit comments