[Bps-public-commit] r12489 - Prophet/branches/luid/lib/Prophet

jesse at bestpractical.com jesse at bestpractical.com
Sat May 17 09:11:36 EDT 2008


Author: jesse
Date: Sat May 17 09:11:35 2008
New Revision: 12489

Modified:
   Prophet/branches/luid/lib/Prophet/Test.pm

Log:
* Added an "unordered" option for test script output

Modified: Prophet/branches/luid/lib/Prophet/Test.pm
==============================================================================
--- Prophet/branches/luid/lib/Prophet/Test.pm	(original)
+++ Prophet/branches/luid/lib/Prophet/Test.pm	Sat May 17 09:11:35 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