2 # Copyright (C) 2007, Parrot Foundation.
9 use Test::More tests => 6;
13 use File::Temp qw| tempdir |;
15 use Parrot::BuildUtil;
19 my $tdir = tempdir( CLEANUP => 1 );
20 ok( chdir $tdir, "Changed to temporary directory for testing" );
21 ok( ( mkdir "lib" ), "Able to make directory lib" );
22 ok( ( mkdir "lib/Parrot" ), "Able to make directory lib/Parrot" );
24 # Case 1: No VERSION file
25 eval { my $pv = Parrot::BuildUtil::parrot_version(); };
26 like( $@, qr/Could not open VERSION file!/, "Absence of VERSION file correctly detected" );
28 ok( chdir $cwd, "Able to change back to directory after testing" );
31 pass("Completed all tests in $0");
33 ################### DOCUMENTATION ###################
37 019-version.t - test C<Parrot::BuildUtil::parrot_version()>
41 % prove t/configure/019-version.t
45 The files in this directory test functionality used by F<Configure.pl>.
47 The tests in this file test Parrot::BuildUtil (F<lib/Parrot/BuildUtil.pm>).
55 Parrot::BuildUtil, F<Configure.pl>.
61 # cperl-indent-level: 4
64 # vim: expandtab shiftwidth=4: