5 use lib qw
't perl/t ..';
8 'YAML::XS', 'qw[:all]',
14 # Load the testing modules
15 foreach my $MODULE ( keys %MODULES ) {
16 eval "use $MODULE $MODULES{$MODULE}";
18 plan
( skip_all
=> "$MODULE not available for testing" );
24 filter
=>[qw
'major minor subminor patchlevel'],
26 version
=> sub{'"'.$_[1].'"'}
31 plan
( tests
=> scalar keys %test );
37 subminor_ver
=> 'subminor',
38 patchlevel_ver
=> 'patchlevel'
41 for my $test ( sort keys %test ){
42 my $expected = $test{$test};
43 my $returned = `echo $test | perl version.pl nsis`;
46 while( $returned =~ m
{
48 !define \s
+ (\w
+) \s
+ (.*?
)\n
54 for my $key ( keys %map ){
55 if( defined $got{$key} ){
56 my $value = $map{$key};
57 $got{$value} = $got{$key} if defined $value;
62 is_deeply
(\
%got,$expected,$test);
65 !define VERSION
"2.06rc10"
68 !define SUBMINOR_VER
99
69 !define PATCHLEVEL_VER
100