diff --git a/t/oneliner.t b/t/oneliner.t index e7c2621f2..9ed7c20f7 100644 --- a/t/oneliner.t +++ b/t/oneliner.t @@ -8,7 +8,7 @@ chdir 't'; use Config; use MakeMaker::Test::Utils; -use Test::More tests => 16; +use Test::More tests => 17; use File::Spec; my $TB = Test::More->builder; @@ -24,6 +24,7 @@ isa_ok($mm, 'ExtUtils::MM_Any'); sub try_oneliner { my($code, $switches, $expect, $name) = @_; my $cmd = $mm->oneliner($code, $switches); + $cmd =~ s{\$\$}{\$}g; # unescape Makefile syntax $cmd =~ s{\$\(ABSPERLRUN\)}{$perl}; # VMS likes to put newlines at the end of commands if there isn't @@ -37,7 +38,8 @@ sub try_oneliner { try_oneliner(q{print "foo'o", ' bar"ar'}, [], q{foo'o bar"ar}, 'quotes'); # How about dollar signs? -try_oneliner(q{$PATH = 'foo'; print $PATH},[], q{foo}, 'dollar signs' ); +try_oneliner(q{my $PATH = 'foo'; print $PATH},[], q{foo}, 'dollar signs' ); +try_oneliner(q{my %h = (1, 2); print $h{1}},[], q{2}, '%h and $h' ); # switches? try_oneliner(q{print 'foo'}, ['-l'], "foo\n", 'switches' );