2 # Copyright (C) 2007, Parrot Foundation.
9 use Test::More tests => 6;
13 use File::Temp qw| tempdir |;
14 use lib qw( lib t/configure/testlib );
15 use Parrot::BuildUtil;
16 use Make_VERSION_File qw| make_VERSION_file |;
20 my $tdir = tempdir( CLEANUP => 1 );
21 ok( chdir $tdir, "Changed to temporary directory for testing" );
22 ok( ( mkdir "lib" ), "Able to make directory lib" );
23 ok( ( mkdir "lib/Parrot" ), "Able to make directory lib/Parrot" );
25 # Case 4: VERSION file with non-numeric component in version number
26 make_VERSION_file(q{0.tomboy.11});
27 eval { my $pv = Parrot::BuildUtil::parrot_version(); };
30 qr/Illegal version component: 'tomboy'/,
31 "Correctly detected non-numeric component in version number"
35 or croak "Unable to delete file from tempdir after testing";
36 ok( chdir $cwd, "Able to change back to directory after testing" );
39 pass("Completed all tests in $0");
41 ################### DOCUMENTATION ###################
45 022-version.t - test C<Parrot::BuildUtil::parrot_version()>
49 % prove t/configure/022-version.t
53 The files in this directory test functionality used by F<Configure.pl>.
55 The tests in this file test Parrot::BuildUtil (F<lib/Parrot/BuildUtil.pm>).
63 Parrot::BuildUtil, F<Configure.pl>.
69 # cperl-indent-level: 4
72 # vim: expandtab shiftwidth=4: