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