[Bps-public-commit] r12207 - in sd/trunk: bin
jesse at bestpractical.com
jesse at bestpractical.com
Fri May 9 21:35:46 EDT 2008
Author: jesse
Date: Fri May 9 21:35:45 2008
New Revision: 12207
Modified:
sd/trunk/bin/sd
sd/trunk/t/sd-attachments.t
Log:
* fixed a small bug in the editor support
Modified: sd/trunk/bin/sd
==============================================================================
--- sd/trunk/bin/sd (original)
+++ sd/trunk/bin/sd Fri May 9 21:35:45 2008
@@ -43,12 +43,12 @@
if (my $file = file(delete $self->args->{'file'})) {
$content = $file->slurp();
$self->args->{'name'} = $file->basename;
- }
- elsif (exists $self->args->{'edit'}) {
+ } elsif ($content = delete $self->args->{'content'}) {
+
+ } elsif (exists $self->args->{'edit'}) {
require Proc::InvokeEditor;
$content = Proc::InvokeEditor->edit;
- }
- else {
+ } else {
print "Please type your comment and press ctrl-d.\n";
$content = do { local $/; <> };
}
Modified: sd/trunk/t/sd-attachments.t
==============================================================================
--- sd/trunk/t/sd-attachments.t (original)
+++ sd/trunk/t/sd-attachments.t Fri May 9 21:35:45 2008
@@ -24,7 +24,7 @@
);
my $attachment_uuid;
-run_output_matches('sd', [qw/ticket attachment create --uuid/, $yatta_uuid, '--name', "paper_order.doc"], [qr/Created attachment (.*?)(?{ $attachment_uuid = $1})$/], [], "Added a attachment");
+run_output_matches('sd', [qw/ticket attachment create --uuid/, $yatta_uuid, '--content', 'stub', '--name', "paper_order.doc"], [qr/Created attachment (.*?)(?{ $attachment_uuid = $1})$/], [], "Added a attachment");
ok($attachment_uuid);
run_output_matches('sd', [qw/ticket attachment list --uuid/, $yatta_uuid], [$attachment_uuid . ' paper_order.doc text/plain',], [], "Found the attachment");
More information about the Bps-public-commit
mailing list