@@ -6,28 +6,28 @@ 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
- @test " Fails when function specified does not exist" {
9
+ @test " core.trap_add fails when function specified does not exist" {
10
10
run core.trap_add ' nonexistent' ' USR1'
11
11
12
12
assert_failure
13
13
assert_output -p " Function 'nonexistent' is not defined"
14
14
}
15
15
16
- @test " Fails when number is given for signal" {
16
+ @test " core.trap_add fails when number is given for signal" {
17
17
run core.trap_add ' function' ' 0'
18
18
19
19
assert_failure
20
20
assert_output -p " Passing numbers for the signal specs is prohibited"
21
21
}
22
22
23
- @test " adds trap function properly" {
23
+ @test " core.trap_add adds trap function properly" {
24
24
somefunction () { : ; }
25
25
core.trap_add ' somefunction' ' USR1'
26
26
27
27
[ " ${___global_trap_table___[USR1]} " = $' \x1C somefunction' ]
28
28
}
29
29
30
- @test " adds trap function properly 2" {
30
+ @test " core.trap_add adds function properly 2" {
31
31
somefunction () { : ; }
32
32
somefunction2 () { : ; }
33
33
core.trap_add ' somefunction' ' USR1'
@@ -36,15 +36,15 @@ load './util/init.sh'
36
36
[ " ${___global_trap_table___[USR1]} " = $' \x1C somefunction\x1C somefunction2' ]
37
37
}
38
38
39
- @test " removes trap function properly 1" {
39
+ @test " core.trap_remove removes trap function properly 1" {
40
40
somefunction () { : ; }
41
41
core.trap_add ' somefunction' ' USR1'
42
42
core.trap_remove ' somefunction' ' USR1'
43
43
44
44
[ " ${___global_trap_table___[USR1]} " = ' ' ]
45
45
}
46
46
47
- @test " removes trap function properly 2" {
47
+ @test " core.trap_remove removes trap function properly 2" {
48
48
somefunction () { : ; }
49
49
somefunction2 () { : ; }
50
50
core.trap_add ' somefunction' ' USR1'
@@ -54,7 +54,7 @@ load './util/init.sh'
54
54
[ " ${___global_trap_table___[USR1]} " = $' \x1C somefunction2' ]
55
55
}
56
56
57
- @test " removes trap function properly 3" {
57
+ @test " core.trap_remove removes trap function properly 3" {
58
58
somefunction () { : ; }
59
59
somefunction2 () { : ; }
60
60
core.trap_add ' somefunction' ' USR1'
0 commit comments