[iperl commit] r156 - in trunk: . t

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 9, 2008, 12:44:11 PM3/9/08
to iperl-...@googlegroups.com
Author: a.r.fe...@gmail.com
Date: Sun Mar 9 09:43:21 2008
New Revision: 156

Added:
trunk/t/11version.t
Modified:
trunk/MANIFEST

Log:
a test for "pirl [-v|--version]"

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Sun Mar 9 09:43:21 2008
@@ -9,6 +9,7 @@
t/01use.t
t/02basic.t
t/10compile.t
+t/11version.t
t/20expect_quit.t
t/50isolated.t
t/90pod.t

Added: trunk/t/11version.t
==============================================================================
--- (empty file)
+++ trunk/t/11version.t Sun Mar 9 09:43:21 2008
@@ -0,0 +1,15 @@
+
+use Test::More no_plan => 1;
+
+my @pirl = ( $^X, '-Mblib', 'blib/script/pirl' );
+
+use IPC::Cmd qw( run );
+use Test::Deep;
+
+for my $switch ( '-v', '--version' ) {
+ my ( $ok, $err, $full_buf, $out_buf, $err_buf ) = run( command =>
[ @pirl, $switch ] );
+ ok( $ok, "'pirl $switch' run ok" );
+ is( $err, 0, 'exited with 0' );
+ cmp_deeply( $out_buf, [ re(qr/\AThis is pirl/) ], 'printed version
info' );
+ cmp_deeply( $err_buf, [], 'no output to STDERR' );
+}

Reply all
Reply to author
Forward
0 new messages