Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 23 lines (16 sloc) 0.705 kb
f82bf0c @jberger added alien_interpolate method (for command interpolation) with tests…
jberger authored
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Alien::Base::ModuleBuild;
6 use File::Spec::Functions 'rel2abs';
7
53b1dcb @jberger fixed failing test, needed a real constructor
jberger authored
8 my $builder = Alien::Base::ModuleBuild->new(
9 module_name => 'My::Test',
10 dist_version => 0.01,
11 alien_name => 'test',
12 );
f82bf0c @jberger added alien_interpolate method (for command interpolation) with tests…
jberger authored
13
14 is( $builder->alien_interpolate('%phello'), $builder->alien_exec_prefix . 'hello', 'prefix interpolation');
15 is( $builder->alien_interpolate('%%phello'), '%phello', 'no prefix interpolation with escape');
16
53b1dcb @jberger fixed failing test, needed a real constructor
jberger authored
17 my $path = rel2abs "_install";
f82bf0c @jberger added alien_interpolate method (for command interpolation) with tests…
jberger authored
18 is( $builder->alien_interpolate('thing other=%s'), "thing other=$path", 'share_dir interpolation');
19 is( $builder->alien_interpolate('thing other=%%s'), 'thing other=%s', 'no share_dir interpolation with escape');
20
21 done_testing;
22
Something went wrong with that request. Please try again.