Skip to content

Commit

Permalink
Don't pass bare %x in argv
Browse files Browse the repository at this point in the history
work around mac osx voodoo (rt-101483).
  • Loading branch information
rwstauner committed Jan 13, 2015
1 parent da8b5e9 commit 913603b
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions t/30_all_phases.t
Expand Up @@ -13,11 +13,15 @@ use Path::Tiny;
[ GatherDir => ],
[ MetaConfig => ],

[ 'Run::BeforeBuild' => { run => [ '%x script%prun.pl before_build %s %n %v .%d.%a. %x' ] } ],
[ 'Run::AfterBuild' => { run => [ '%x script%prun.pl after_build %n %v %d %s %s %v .%a. %x' ] } ],
[ 'Run::BeforeRelease' => { run => [ '%x script%prun.pl before_release %n -d %d %s -v %v .%a. %x' ] } ],
[ 'Run::Release' => { run => [ '%x script%prun.pl release %s %n %v %d/a %d/b %a %x' ] } ],
[ 'Run::AfterRelease' => { run => [ '%x script%prun.pl after_release %d %v %s %s %n %a %x' ] } ],
# NOTE: We prepend "x:" to %x to work around Mac Perl's
# "versioner" voodoo which rewrites @ARGV elements of
# "/usr/bin/perl" to "/usr/bin/perl5.18" (rt-101483).

[ 'Run::BeforeBuild' => { run => [ '%x script%prun.pl before_build %s %n %v .%d.%a. x:%x' ] } ],
[ 'Run::AfterBuild' => { run => [ '%x script%prun.pl after_build %n %v %d %s %s %v .%a. x:%x' ] } ],
[ 'Run::BeforeRelease' => { run => [ '%x script%prun.pl before_release %n -d %d %s -v %v .%a. x:%x' ] } ],
[ 'Run::Release' => { run => [ '%x script%prun.pl release %s %n %v %d/a %d/b %a x:%x' ] } ],
[ 'Run::AfterRelease' => { run => [ '%x script%prun.pl after_release %d %v %s %s %n %a x:%x' ] } ],
),
path(qw(source lib Foo.pm)) => "package Foo;\n1;\n",
path(qw(source script run.pl)) => <<'SCRIPT',
Expand Down Expand Up @@ -45,11 +49,11 @@ SCRIPT

# test constant conversions as well as positional %s for backward compatibility
my $expected = <<OUTPUT;
before_build $f{v} $f{n} $f{v} ... $f{x}
after_build $f{n} $f{v} $f{d} $f{d} $f{v} $f{v} .. $f{x}
before_release $f{n} -d $f{d} $f{a} -v $f{v} .$f{a}. $f{x}
release $f{a} $f{n} $f{v} $f{d}/a $f{d}/b $f{a} $f{x}
after_release $f{d} $f{v} $f{a} $f{v} $f{n} $f{a} $f{x}
before_build $f{v} $f{n} $f{v} ... x:$f{x}
after_build $f{n} $f{v} $f{d} $f{d} $f{v} $f{v} .. x:$f{x}
before_release $f{n} -d $f{d} $f{a} -v $f{v} .$f{a}. x:$f{x}
release $f{a} $f{n} $f{v} $f{d}/a $f{d}/b $f{a} x:$f{x}
after_release $f{d} $f{v} $f{a} $f{v} $f{n} $f{a} x:$f{x}
OUTPUT

is(
Expand Down

0 comments on commit 913603b

Please sign in to comment.