@@ -8,7 +8,7 @@ chdir 't';
8
8
9
9
use Config;
10
10
use MakeMaker::Test::Utils;
11
- use Test::More tests => 16 ;
11
+ use Test::More tests => 17 ;
12
12
use File::Spec;
13
13
14
14
my $TB = Test::More-> builder;
@@ -25,6 +25,7 @@ sub try_oneliner {
25
25
my ($code , $switches , $expect , $name ) = @_ ;
26
26
my $cmd = $mm -> oneliner($code , $switches );
27
27
$cmd =~ s {\$\( ABSPERLRUN\) } { $perl } ;
28
+ $cmd =~ s {\$\$ } { \$ } g ; # unescape Makefile syntax
28
29
29
30
# VMS likes to put newlines at the end of commands if there isn't
30
31
# one already.
@@ -37,7 +38,8 @@ sub try_oneliner {
37
38
try_oneliner(q{ print "foo'o", ' bar"ar'} , [], q{ foo'o bar"ar} , ' quotes' );
38
39
39
40
# How about dollar signs?
40
- try_oneliner(q{ $PATH = 'foo'; print $PATH} ,[], q{ foo} , ' dollar signs' );
41
+ try_oneliner(q{ my $PATH = 'foo'; print $PATH} ,[], q{ foo} , ' dollar signs' );
42
+ try_oneliner(q{ my %h = (1, 2); print $h{1}} ,[], q{ 2} , ' %h and $h' );
41
43
42
44
# switches?
43
45
try_oneliner(q{ print 'foo'} , [' -l' ], " foo\n " , ' switches' );
0 commit comments