@@ -11,10 +11,14 @@ sub cmp
11
11
{
12
12
return 1;
13
13
}
14
- else
14
+ elsif ( $str eq " feargal " )
15
15
{
16
- return (0, " your names not down, you're not coming in" );
16
+ return (0, " your name's not down, you're not coming in" );
17
17
}
18
+ else
19
+ {
20
+ return 0;
21
+ }
18
22
}
19
23
20
24
{
@@ -29,7 +33,8 @@ sub cmp
29
33
" code ok"
30
34
);
31
35
32
- my ($prem , $res ) = check_test(
36
+ my ($prem , $res );
37
+ ($prem , $res ) = check_test(
33
38
sub {
34
39
cmp_deeply(" feargal" , code(\&cmp ));
35
40
},
@@ -39,6 +44,19 @@ sub cmp
39
44
" code not ok"
40
45
);
41
46
42
- like($res -> {diag }, " /your names not down/" , " diagnostics" );
47
+ like($res -> {diag }, " /your name's not down/" , " diagnostics" );
43
48
like($res -> {diag }, " /feargal/" , " diagnostics" );
49
+
50
+ ($prem , $res ) = check_test(
51
+ sub {
52
+ cmp_deeply(" fazzer" , code(\&cmp ));
53
+ },
54
+ {
55
+ actual_ok => 0,
56
+ },
57
+ " code not ok"
58
+ );
59
+
60
+ like($res -> {diag }, " /it failed but it didn't say why/" , " no diagnostics" );
61
+ like($res -> {diag }, " /fazzer/" , " no diagnostics" );
44
62
}
0 commit comments