Commit | Line | Data |
6d6be53e |
1 | #!/usr/bin/perl -w |
2 | |
3 | BEGIN { |
b78fd716 |
4 | unshift @INC, 't/lib'; |
6d6be53e |
5 | } |
6 | chdir 't'; |
7 | |
8 | use Test::More tests => 6; |
9 | |
10 | use ExtUtils::MakeMaker; |
11 | use ExtUtils::MM_VMS; |
12 | |
13 | sub test_filter { |
14 | my($text, $vms_text) = @_; |
15 | |
16 | local $Test::Builder::Level = $Test::Builder::Level + 1; |
17 | is( ExtUtils::MM_Any->maketext_filter($text), $text, 'default filter' ); |
18 | is( ExtUtils::MM_VMS->maketext_filter($text), $vms_text, 'VMS filter' ); |
19 | } |
20 | |
21 | |
22 | # VMS filter puts a space after the target |
23 | test_filter(<<'END', <<'VMS'); |
24 | foo: bar |
25 | thing: splat |
26 | END |
27 | foo : bar |
28 | thing: splat |
29 | VMS |
30 | |
31 | |
32 | # And it does it for all targets |
33 | test_filter(<<'END', <<'VMS'); |
34 | foo: bar |
35 | thing: splat |
36 | |
37 | up: down |
38 | yes |
39 | END |
40 | foo : bar |
41 | thing: splat |
42 | |
43 | up : down |
44 | yes |
45 | VMS |
46 | |
47 | |
48 | # And it doesn't mess with macros |
49 | test_filter(<<'END', <<'VMS'); |
50 | CLASS=Foo: Bar |
51 | |
52 | target: stuff |
53 | $(PROGRAM) And::Stuff |
54 | END |
55 | CLASS=Foo: Bar |
56 | |
57 | target : stuff |
58 | $(PROGRAM) And::Stuff |
59 | VMS |