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

sartak at bestpractical.com sartak at bestpractical.com
Mon Jul 14 12:33:18 EDT 2008


Author: sartak
Date: Mon Jul 14 12:33:16 2008
New Revision: 14067

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Test/Participant.pm
   Prophet/trunk/t/edit.t
   Prophet/trunk/t/export.t
   Prophet/trunk/t/non-conflicting-merge.t
   Prophet/trunk/t/real-conflicting-merge.t
   Prophet/trunk/t/simple-conflicting-merge.t
   Prophet/trunk/t/simple-push.t

Log:
 r64114 at onn:  sartak | 2008-07-11 11:09:32 -0400
 Use -- as a arg/prop separator in tests. Some of the mergers are still failing tests though. :/


Modified: Prophet/trunk/lib/Prophet/Test/Participant.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Test/Participant.pm	(original)
+++ Prophet/trunk/lib/Prophet/Test/Participant.pm	Mon Jul 14 12:33:16 2008
@@ -78,7 +78,7 @@
     my $args = shift;
     @{ $args->{props} } = _random_props() unless $args->{props};
 
-    my ( $ret, $out, $err ) = call_func_ok( [ qw(create --type Scratch), @{ $args->{props} } ] );
+    my ( $ret, $out, $err ) = call_func_ok( [ qw(create --type Scratch --), @{ $args->{props} } ] );
 
     #    ok($ret, $self->name . " created a record");
     if ( $out =~ /Created\s+(.*?)\s+(\d+)\s+\((.*)\)/i ) {
@@ -102,7 +102,7 @@
     %{ $args->{props} } = _permute_props(%props) unless $args->{props};
     %props = %{ $args->{props} };
 
-    call_func_ok( [ qw(update --type Scratch --uuid), $args->{record}, map { '--' . $_ => $props{$_} } keys %props ],
+    call_func_ok( [ qw(update --type Scratch --uuid), $args->{record}, '--', map { '--' . $_ => $props{$_} } keys %props ],
         $self->name . " updated a record" );
 
     $self->record_action( 'update_record', $args );

Modified: Prophet/trunk/t/edit.t
==============================================================================
--- Prophet/trunk/t/edit.t	(original)
+++ Prophet/trunk/t/edit.t	Mon Jul 14 12:33:16 2008
@@ -107,6 +107,7 @@
     'update',
     '--type=Robot Master',
     '--uuid=' . $crash_man->uuid,
+    '--',
     '--weakness=Hard Knuckle',
 );
 

Modified: Prophet/trunk/t/export.t
==============================================================================
--- Prophet/trunk/t/export.t	(original)
+++ Prophet/trunk/t/export.t	Mon Jul 14 12:33:16 2008
@@ -8,7 +8,7 @@
 use Test::Exception;
 
 as_alice {
-    run_ok( 'prophet', [qw(create --type Bug --status new --from alice )], "Created a record as alice" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status new --from alice )], "Created a record as alice" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/new/], " Found our record" );
 };
 
@@ -20,7 +20,7 @@
 
 as_bob {
 
-    run_ok( 'prophet', [qw(create --type Dummy --ignore yes)], "Created a dummy record" );
+    run_ok( 'prophet', [qw(create --type Dummy -- --ignore yes)], "Created a dummy record" );
 
     diag repo_uri_for('bob');
     diag repo_uri_for('alice');
@@ -34,10 +34,10 @@
     }
     diag($record_id);
 
-    run_ok( 'prophet', [ 'update', '--type', 'Bug', '--uuid', $record_id, '--status' => 'stalled' ] );
+    run_ok( 'prophet', [ 'update', '--type', 'Bug', '--uuid', $record_id, '--', '--status' => 'stalled' ] );
     run_output_matches(
         'prophet',
-        ['show', '--type',            'Bug',             '--uuid', $record_id, '--batch'],
+        ['show', '--type', 'Bug', '--uuid', $record_id, '--batch'],
         [
             qr/id: (\d+) \($record_id\)/,
               'status: stalled',

Modified: Prophet/trunk/t/non-conflicting-merge.t
==============================================================================
--- Prophet/trunk/t/non-conflicting-merge.t	(original)
+++ Prophet/trunk/t/non-conflicting-merge.t	Mon Jul 14 12:33:16 2008
@@ -6,7 +6,7 @@
 use Prophet::Test tests => 25;
 
 as_alice {
-    run_ok( 'prophet', [qw(create --type Bug --status new --from alice )], "Created a record as alice" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status new --from alice )], "Created a record as alice" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/new/], " Found our record" );
 
     # update the record
@@ -15,7 +15,7 @@
 };
 
 as_bob {
-    run_ok( 'prophet', [qw(create --type Bug --status open --from bob )], "Created a record as bob" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status open --from bob )], "Created a record as bob" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/open/], " Found our record" );
 
     # update the record

Modified: Prophet/trunk/t/real-conflicting-merge.t
==============================================================================
--- Prophet/trunk/t/real-conflicting-merge.t	(original)
+++ Prophet/trunk/t/real-conflicting-merge.t	Mon Jul 14 12:33:16 2008
@@ -7,7 +7,7 @@
 use Prophet::Test tests => 19;
 
 as_alice {
-    like(run_command(qw(create --type Bug --status new --from alice)), qr/Created Bug/, "Created a record as alice");
+    like(run_command(qw(create --type Bug -- --status new --from alice)), qr/Created Bug/, "Created a record as alice");
     like(run_command(qw(search --type Bug --regex .)), qr/new/, "Found our record");
 };
 
@@ -17,7 +17,7 @@
 
 as_bob {
 
-    like(run_command(qw(create --type Dummy --ignore yes)), qr/Created Dummy/);
+    like(run_command(qw(create --type Dummy -- --ignore yes)), qr/Created Dummy/);
     like(run_command('merge', '--to', repo_uri_for('bob'), '--from', repo_uri_for('alice')), qr/Merge complete/, "Sync ran ok!");
 
     # check our local replicas
@@ -27,11 +27,11 @@
         $record_id = $1;
     }
 
-    like(run_command( 'update', '--type', 'Bug', '--uuid', $record_id, '--status' => 'stalled'), qr/Bug .* updated/);
+    like(run_command( 'update', '--type', 'Bug', '--uuid', $record_id, '--', '--status' => 'stalled'), qr/Bug .* updated/);
 
     run_output_matches(
         'prophet',
-        [ 'show', '--type',            'Bug',             '--uuid', $record_id, '--batch' ],
+        [ 'show', '--type', 'Bug', '--uuid', $record_id, '--batch' ],
         [
         qr/id: (\d+) \($record_id\)/,
           'status: stalled',
@@ -42,11 +42,11 @@
 };
 
 as_alice {
-    like(run_command('update', '--type', 'Bug', '--uuid', $record_id, '--status' => 'open' ), qr/Bug .* updated/);
+    like(run_command('update', '--type', 'Bug', '--uuid', $record_id, '--', '--status' => 'open' ), qr/Bug .* updated/);
 
     run_output_matches(
         'prophet',
-        [ 'show', '--type',            'Bug',          '--uuid', $record_id, '--batch' ],
+        [ 'show', '--type', 'Bug', '--uuid', $record_id, '--batch' ],
         [
             qr/id: (\d+) \($record_id\)/,
               'status: open',

Modified: Prophet/trunk/t/simple-conflicting-merge.t
==============================================================================
--- Prophet/trunk/t/simple-conflicting-merge.t	(original)
+++ Prophet/trunk/t/simple-conflicting-merge.t	Mon Jul 14 12:33:16 2008
@@ -7,7 +7,7 @@
 use Test::Exception;
 
 as_alice {
-    run_ok( 'prophet', [qw(create --type Bug --status new --from alice )], "Created a record as alice" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status new --from alice )], "Created a record as alice" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/new/], " Found our record" );
 };
 
@@ -17,7 +17,7 @@
 
 as_bob {
 
-    run_ok( 'prophet', [qw(create --type Dummy --ignore yes)], "Created a dummy record" );
+    run_ok( 'prophet', [qw(create --type Dummy -- --ignore yes)], "Created a dummy record" );
 
     run_ok( 'prophet', [ 'merge',  '--to', repo_uri_for('bob'), '--from', repo_uri_for('alice') ], "Sync ran ok!" );
 
@@ -28,10 +28,10 @@
         $record_id = $1;
     }
 
-    run_ok( 'prophet', [ 'update', '--type', 'Bug', '--uuid', $record_id, '--status' => 'stalled' ] );
+    run_ok( 'prophet', [ 'update', '--type', 'Bug', '--uuid', $record_id, '--', '--status' => 'stalled' ] );
     run_output_matches(
         'prophet',
-        [ 'show','--type',            'Bug',             '--uuid', $record_id ],
+        [ 'show','--type', 'Bug', '--uuid', $record_id ],
         [
             qr/id:     (\d+) \($record_id\)/,
               'status: stalled',
@@ -42,10 +42,10 @@
 };
 
 as_alice {
-    run_ok( 'prophet', [ 'update', '--type', 'Bug', '--uuid', $record_id, '--status' => 'stalled' ] );
+    run_ok( 'prophet', [ 'update', '--type', 'Bug', '--uuid', $record_id, '--', '--status' => 'stalled' ] );
     run_output_matches(
         'prophet',
-        ['show', '--type',            'Bug',             '--uuid', $record_id, '--batch', ],
+        ['show', '--type', 'Bug', '--uuid', $record_id, '--batch', ],
         [
             qr/id: (\d+) \($record_id\)/,
               'status: stalled',

Modified: Prophet/trunk/t/simple-push.t
==============================================================================
--- Prophet/trunk/t/simple-push.t	(original)
+++ Prophet/trunk/t/simple-push.t	Mon Jul 14 12:33:16 2008
@@ -6,7 +6,7 @@
 use Prophet::Test tests => 14;
 
 as_alice {
-    run_ok( 'prophet', [qw(create --type Bug --status new --from alice )], "Created a record as alice" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status new --from alice )], "Created a record as alice" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/new/], " Found our record" );
 
     # update the record
@@ -15,7 +15,7 @@
 };
 
 as_bob {
-    run_ok( 'prophet', [qw(create --type Bug --status open --from bob )], "Created a record as bob" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status open --from bob )], "Created a record as bob" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/open/], " Found our record" );
 
     # update the record
@@ -94,7 +94,7 @@
 my $last_id;
 
 as_bob {
-    run_ok( 'prophet', [qw(create --type Bug --status new --from bob )], "Created a record as bob" );
+    run_ok( 'prophet', [qw(create --type Bug -- --status new --from bob )], "Created a record as bob" );
     my ( $ret, $stdout, $stderr ) = run_script( 'prophet', [qw(search --type Bug --regex new)] );
     if ( $stdout =~ /^(.*?)\s/ ) {
         $last_id = $1;



More information about the Bps-public-commit mailing list