Permalink
Browse files

t/run/options: Perform all tests before cleanup

  • Loading branch information...
1 parent 32624b2 commit 59b7cec036c54d84af4893deeaa293065fdec3a3 @Benabik Benabik committed Jan 26, 2012
Showing with 11 additions and 10 deletions.
  1. +11 −10 t/run/options.t
View
@@ -109,10 +109,20 @@ needs_an_argument('--gc-nursery-size');
is( $exit, 0, '... and should not crash' );
}
-
# Test --leak-test
is( qx{$PARROT --leak-test "$first_pir_file"}, "first\n", '--leak-test' );
+#make sure that VERSION matches the output of --version
+open(my $version_fh, "<", "VERSION") or die "couldn't open VERSION: $!";
+my $file_version = <$version_fh>;
+chomp($file_version);
+close($version_fh);
+for my $version ('-V', '--version') {
+ like( qx{$PARROT $version}, qr/.*${file_version}.*/, "VERSION matches $version" );
+}
+
+
+
# clean up temporary files
unlink $first_pir_file;
unlink $second_pir_file;
@@ -146,15 +156,6 @@ sub needs_an_argument {
}
-#make sure that VERSION matches the output of --version
-open(my $version_fh, "<", "VERSION") or die "couldn't open VERSION: $!";
-my $file_version = <$version_fh>;
-chomp($file_version);
-close($version_fh);
-for my $version ('-V', '--version') {
- like( qx{$PARROT $version}, qr/.*${file_version}.*/, "VERSION matches $version" );
-}
-
## GH #346 test remaining options
# TODO: Add tests for attached options

0 comments on commit 59b7cec

Please sign in to comment.