Commit | Line | Data |
cb8340be |
1 | #!./perl |
2 | |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
5 | unshift @INC, '../lib'; |
6 | require './test.pl'; # for which_perl() etc |
7 | } |
8 | |
9 | BEGIN { |
10 | plan(4); |
11 | } |
12 | |
13 | #1 |
14 | fresh_perl_is('sub cm : assertion { "ok" }; use assertions Hello; print cm()', |
15 | 'ok', |
16 | { switches => ['-AHello'] }, '-A'); |
17 | |
18 | #2 |
19 | fresh_perl_is('sub cm : assertion { "ok" }; use assertions SDFJKS; print cm()', |
20 | 'ok', |
21 | { switches => ['-A.*'] }, '-A.*'); |
22 | |
23 | #3 |
24 | fresh_perl_is('sub cm : assertion { "ok" }; use assertions Bye; print cm()', |
25 | 'ok', |
26 | { switches => ['-AB.e'] }, '-AB.e'); |
27 | |
28 | #4 |
29 | fresh_perl_is('sub cm : assertion { "ok" }; use assertions Hello; print cm()', |
30 | '0', |
31 | { switches => ['-ANoH..o'] }, '-ANoH..o'); |