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