Reworked test files for better error reporting
[nasm/perl-rewrite.git] / perl / t / version / yaml.t
blob3fce8bd3cd5b98be5c8179a774d559dbeb991b60
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
5 use lib qw't perl/t ..';
7 my @MODULES = (
8 'YAML::XS',
9 'version::input',
12 use Test::More;
14 # Load the testing modules
15 foreach my $MODULE ( @MODULES ) {
16 eval "use $MODULE";
17 if ( $@ ) {
18 plan( skip_all => "$MODULE not available for testing" );
23 our %test = load(
24 'all'
28 plan( tests => scalar keys %test );
31 for my $test ( sort keys %test ){
32 my $expected = $test{$test};
33 my $returned = `echo $test | perl version.pl yaml`;
34 my $got = YAML::XS::Load($returned) || $returned;
36 is_deeply($got,$expected,$test);
38 __END__
39 ---
40 id: 33907556
41 major: 2
42 mangled: 2.05.99.100
43 minor: 5
44 patchlevel: 100
45 rc: 10
46 subminor: 99
47 xid: 0x02056364