Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improved tests, version is 0.02

  • Loading branch information...
commit 7a9f871710fe6489fbc640b91fc8c20dae68dd12 1 parent 794c0be
@FROGGS authored
View
3  Build.PL
@@ -13,6 +13,9 @@ my $build = Module::Build->new(
'Time::HiRes' => '0',
'SDL' => '2.532',
},
+ build_requires => {
+ 'Capture::Tiny' => '0',
+ },
configure_requires => {
'Module::Build' => '0.38',
},
View
5 CHANGELOG
@@ -1,4 +1,7 @@
Revision history for Perl module Games::BubbleBreaker
+0.02 Fri Jun 24 2011
+ - better tests
+
0.01 Sun Jun 22 2011
- - first release [FROGGS]
+ - first release
View
9 META.json
@@ -14,6 +14,11 @@
},
"name" : "Games-BubbleBreaker",
"prereqs" : {
+ "build" : {
+ "requires" : {
+ "Capture::Tiny" : 0
+ }
+ },
"configure" : {
"requires" : {
"Module::Build" : "0.38"
@@ -31,7 +36,7 @@
"provides" : {
"Games::BubbleBreaker" : {
"file" : "lib/Games/BubbleBreaker.pm",
- "version" : "0.01"
+ "version" : "0.02"
}
},
"release_status" : "stable",
@@ -43,5 +48,5 @@
"url" : "http://github.com/FROGGS/Games-BubbleBreaker"
}
},
- "version" : "0.01"
+ "version" : "0.02"
}
View
7 META.yml
@@ -2,7 +2,8 @@
abstract: 'a mouse based logic game'
author:
- 'Tobias Leich <froggs@cpan.org>'
-build_requires: {}
+build_requires:
+ Capture::Tiny: 0
configure_requires:
Module::Build: 0.38
dynamic_config: 1
@@ -15,7 +16,7 @@ name: Games-BubbleBreaker
provides:
Games::BubbleBreaker:
file: lib/Games/BubbleBreaker.pm
- version: 0.01
+ version: 0.02
requires:
File::ShareDir: 1.00
File::Spec: 0
@@ -24,4 +25,4 @@ requires:
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/FROGGS/Games-BubbleBreaker
-version: 0.01
+version: 0.02
View
2  lib/Games/BubbleBreaker.pm
@@ -1,6 +1,6 @@
package Games::BubbleBreaker;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
1;
View
13 t/00-run.t
@@ -1,12 +1,23 @@
use strict;
use warnings;
use Time::HiRes;
+use Capture::Tiny;
use Test::Most 'bail';
my $time = Time::HiRes::time;
$ENV{'BUBBLEBREAKER_TEST'} = 1;
-is( system("$^X bin/bubble-breaker.pl"), 0, 'bubble-breaker ran ' . (Time::HiRes::time - $time) . ' seconds' );
+ok( -e 'bin/bubble-breaker.pl', 'bin/bubble-breaker.pl exists' );
+is( system("$^X -e 1"), 0, "we can execute perl as $^X" );
+my ($stdout, $stderr) = Capture::Tiny::capture { system("$^X bin/bubble-breaker.pl") };
+ok( !$stderr, 'bubble-breaker ran ' . (Time::HiRes::time - $time) . ' seconds' );
+
+$stdout ||= '';
+
+if($stderr) {
+ diag( "\$^X = $^X");
+ diag( "STDERR = $stderr");
+}
pass 'Are we still alive? Checking for segfaults';
Please sign in to comment.
Something went wrong with that request. Please try again.