82dee7de92a0bd35 failed to add ext/lib/Makefile.PL. Oops.
[p5sagit/p5-mst-13.2.git] / ext / ExtUtils-MakeMaker / t / maketext_filter.t
CommitLineData
6d6be53e 1#!/usr/bin/perl -w
2
3BEGIN {
b78fd716 4 unshift @INC, 't/lib';
6d6be53e 5}
6chdir 't';
7
8use Test::More tests => 6;
9
10use ExtUtils::MakeMaker;
11use ExtUtils::MM_VMS;
12
13sub 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
23test_filter(<<'END', <<'VMS');
24foo: bar
25 thing: splat
26END
27foo : bar
28 thing: splat
29VMS
30
31
32# And it does it for all targets
33test_filter(<<'END', <<'VMS');
34foo: bar
35 thing: splat
36
37up: down
38 yes
39END
40foo : bar
41 thing: splat
42
43up : down
44 yes
45VMS
46
47
48# And it doesn't mess with macros
49test_filter(<<'END', <<'VMS');
50CLASS=Foo: Bar
51
52target: stuff
53 $(PROGRAM) And::Stuff
54END
55CLASS=Foo: Bar
56
57target : stuff
58 $(PROGRAM) And::Stuff
59VMS