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 2: VERSION file with <3-element version number
26 make_VERSION_file(q{0.4});
27 eval { my $pv = Parrot::BuildUtil::parrot_version(); };
30 qr/Too few components to VERSION file contents/,
31 "Correctly detected too few components 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" );
38 pass("Completed all tests in $0");
40 ################### DOCUMENTATION ###################
44 020-version.t - test C<Parrot::BuildUtil::parrot_version()>
48 % prove t/configure/020-version.t
52 The files in this directory test functionality used by F<Configure.pl>.
54 The tests in this file test Parrot::BuildUtil (F<lib/Parrot/BuildUtil.pm>).
62 Parrot::BuildUtil, F<Configure.pl>.
68 # cperl-indent-level: 4
71 # vim: expandtab shiftwidth=4: