[Bps-public-commit] r15118 - in sd/trunk: . lib/App/SD

spang at bestpractical.com spang at bestpractical.com
Wed Aug 13 10:27:36 EDT 2008


Author: spang
Date: Wed Aug 13 10:27:22 2008
New Revision: 15118

Added:
   sd/trunk/t/02-create-with-editor.t
   sd/trunk/t/ticket-create-editor.pl   (contents, props changed)
Modified:
   sd/trunk/   (props changed)
   sd/trunk/lib/App/SD/Test.pm

Log:
 r48222 at loki:  spang | 2008-08-13 15:18:13 +0100
 
 r48223 at loki:  spang | 2008-08-13 15:23:02 +0100
 as it turns out, weird things happen when you've been playing around with $EDITOR.
 add tests for creating a ticket / comment together using an editor.
 r48224 at loki:  spang | 2008-08-13 15:24:09 +0100
 undo bogus commits
 r48225 at loki:  spang | 2008-08-13 15:26:32 +0100
 re-add missing changes to App::SD::Test


Modified: sd/trunk/lib/App/SD/Test.pm
==============================================================================
--- sd/trunk/lib/App/SD/Test.pm	(original)
+++ sd/trunk/lib/App/SD/Test.pm	Wed Aug 13 10:27:22 2008
@@ -53,3 +53,20 @@
     return undef;
 }
 
+=head2 create_ticket_with_editor_ok
+
+Creates a ticket and comment at the same time using a spawned editor.
+It's expected that C<$ENV{VISUAL}> has been frobbed into something
+non-interactive, or this test will just hang forever.
+
+=cut
+
+sub create_ticket_with_editor_ok {
+    my ( $ticket_uuid, $ticket_luid, $comment_uuid, $comment_luid );
+    local $Test::Builder::Level = $Test::Builder::Level + 1;
+    Prophet::Test::run_output_matches( 'sd', [ 'ticket', 'create' ],
+        [qr/Created ticket (.*?)(?{ $ticket_luid = $1})\s+\((.*)(?{ $ticket_uuid = $2 })\)/, qr/Created comment (.*?)(?{ $comment_luid = $1})\s+\((.*)(?{ $comment_uuid = $2 })\)/]
+    );
+
+    return ( $ticket_luid, $ticket_uuid, $comment_luid, $comment_uuid );
+}

Added: sd/trunk/t/02-create-with-editor.t
==============================================================================

Added: sd/trunk/t/ticket-create-editor.pl
==============================================================================



More information about the Bps-public-commit mailing list