82dee7de92a0bd35 failed to add ext/lib/Makefile.PL. Oops.
[p5sagit/p5-mst-13.2.git] / ext / ExtUtils-MakeMaker / t / maketext_filter.t
1 #!/usr/bin/perl -w
2
3 BEGIN {
4     unshift @INC, 't/lib';
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