5 use lib qw
't perl/t ..';
9 filter
=> [qw
' major minor subminor patchlevel xid snapshot'],
11 version
=> sub{'"'.$_[1].'"'}
16 eval "use Test::More 'tests' => ".(scalar keys %test);
22 mangled_ver
=> 'mangled',
27 subminor_ver
=> 'subminor',
28 patchlevel_ver
=> 'patchlevel'
31 for my $test ( sort keys %test ){
32 my $expected = $test{$test};
33 my $returned = `echo $test | perl version.pl h`;
37 $returned =~ m/#define NASM_VERSION_H\n/gc;
38 while( $returned =~ m
{
40 [#] define \s+ NASM_(\w+)\s+(.+?)\n
46 for my $key ( keys %map ){
47 if( defined $got{$key} ){
48 my $value = $map{$key};
49 $got{$value} = $got{$key} if defined $value;
54 is_deeply
(\
%got,$expected,$test);
57 #ifndef NASM_VERSION_H
58 #define NASM_VERSION_H
59 #define NASM_MAJOR_VER 2
60 #define NASM_MINOR_VER 5
61 #define NASM_SUBMINOR_VER 99
62 #define NASM_PATCHLEVEL_VER 100
63 #define NASM_VERSION_ID 0x02056364
64 #define NASM_VER "2.06rc10"
65 #endif /* NASM_VERSION_H */