summaryrefslogtreecommitdiff
path: root/t/run/switch_A.t
blob: d79f430df0778b4932178607b32d106366aa3023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!./perl

BEGIN {
    chdir 't' if -d 't';
    @INC = '../lib';
    require './test.pl';
}

BEGIN {
    plan(5);
}

#1
fresh_perl_is('sub cm : assertion { "ok" }; use assertions Hello; print cm()',
	      'ok',
	      { switches => ['-AHello'] }, '-AHello');

#2
fresh_perl_is('sub cm : assertion { "ok" }; use assertions SDFJKS; print cm()',
	      'ok',
	      { switches => ['-A.*'] }, '-A.*');

#3
fresh_perl_is('sub cm : assertion { "ok" }; use assertions Bye; print cm()',
	      'ok',
	      { switches => ['-AB.e'] }, '-AB.e');

#4
fresh_perl_is('sub cm : assertion { "ok" }; use assertions Hello; print cm()',
	      '0',
	      { switches => ['-ANoH..o'] }, '-ANoH..o');

#5
fresh_perl_is('sub cm : assertion { "ok" }; use assertions Hello; print cm()',
             'ok',
             { switches => ['-A'] }, '-A');