Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

t/run/options: Perform all tests before cleanup

  • Loading branch information...
commit 59b7cec036c54d84af4893deeaa293065fdec3a3 1 parent 32624b2
@Benabik Benabik authored
Showing with 11 additions and 10 deletions.
  1. +11 −10 t/run/options.t
View
21 t/run/options.t
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.