[Bps-public-commit] r11599 - in SVN-PropDB: .

clkao at bestpractical.com clkao at bestpractical.com
Sun Apr 6 09:34:50 EDT 2008


Author: clkao
Date: Sun Apr  6 09:34:14 2008
New Revision: 11599

Added:
   SVN-PropDB/README
Modified:
   SVN-PropDB/lib/Prophet/Test.pm

Log:
test cleanups & instructions.

Added: SVN-PropDB/README
==============================================================================
--- (empty file)
+++ SVN-PropDB/README	Sun Apr  6 09:34:14 2008
@@ -0,0 +1,8 @@
+to run all tests including rt and hm:
+
+JIFTY_APP_ROOT=/Users/clkao/work/bps/BTDT RT_DBA_USER=root RT_DBA_PASSWORD= PERL5LIB=/Users/clkao/work/bps/rt-3.7/lib make test
+
+to collect coverage:
+
+JIFTY_APP_ROOT=/Users/clkao/work/bps/BTDT RT_DBA_USER=root RT_DBA_PASSWORD= PERL5LIB=/Users/clkao/work/bps/rt-3.7/lib cover -test
+

Modified: SVN-PropDB/lib/Prophet/Test.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Test.pm	(original)
+++ SVN-PropDB/lib/Prophet/Test.pm	Sun Apr  6 09:34:14 2008
@@ -156,11 +156,11 @@
         _mk_cmp_closure( $exp_stderr, $stdout_err );                                       # stderr
 
     if (@$stdout_err) {
-        @_ = ( 0, join( ' ', "$msg:", $script, @$arg ) );
+        @_ = ( 0, join( ' ', $msg ? "$msg:" : '', $script, @$arg ) );
         diag( "Different in line: " . join( ',', @$stdout_err ) );
         goto \&ok;
     } else {
-        @_ = ( 1, join( ' ', "$msg:", $script, @$arg ) );
+        @_ = ( 1, join( ' ', $msg ? "$msg:" : '', $script, @$arg ) );
         goto \&ok;
     }
 
@@ -168,6 +168,7 @@
 
 sub run_output_matches {
     my ( $script, $args, $expected, $msg ) = @_;
+    Test::Builder->new->level(2);
     lives_and {
         @_ = ( $script, $args, $expected, [], $msg );
         goto \&is_script_output;



More information about the Bps-public-commit mailing list