[Bps-public-commit] r12493 - in Prophet/trunk: .

jesse at bestpractical.com jesse at bestpractical.com
Sat May 17 09:12:31 EDT 2008


Author: jesse
Date: Sat May 17 09:12:28 2008
New Revision: 12493

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Test.pm

Log:
 r31231 at dhcp113 (orig r12489):  jesse | 2008-05-17 22:11:35 +0900
 * Added an "unordered" option for test script output


Modified: Prophet/trunk/lib/Prophet/Test.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Test.pm	(original)
+++ Prophet/trunk/lib/Prophet/Test.pm	Sat May 17 09:12:28 2008
@@ -3,7 +3,7 @@
 
 package Prophet::Test;
 use base qw/Test::More Exporter/;
-our @EXPORT = qw/as_alice as_bob as_charlie as_david as_user run_ok repo_uri_for run_script run_output_matches replica_last_rev replica_merge_tickets replica_uuid_for fetch_newest_changesets ok_added_revisions replica_uuid
+our @EXPORT = qw/as_alice as_bob as_charlie as_david as_user run_ok repo_uri_for run_script run_output_matches run_output_matches_unordered replica_last_rev replica_merge_tickets replica_uuid_for fetch_newest_changesets ok_added_revisions replica_uuid
     serialize_conflict serialize_changeset in_gladiator diag is_script_output run_command set_editor load_record
     /;
 
@@ -193,6 +193,14 @@
     };
 }
 
+sub run_output_matches_unordered {
+    my $cmd = shift;
+    my $args = shift;
+    my $output = shift;
+    my ($val, $out, $err)  = run_script( $cmd, $args);
+    is_deeply([sort split(/\n/,$out)], [sort @$output]);
+}
+
 =head2 repo_path_for $USERNAME
 
 Returns a path on disk for where $USERNAME's replica is stored



More information about the Bps-public-commit mailing list