[Rt-commit] rt branch, 4.0/cli-raw-print-links, created. rt-4.0.5-80-ge5385c3

? sunnavy sunnavy at bestpractical.com
Thu Mar 1 06:57:14 EST 2012


The branch, 4.0/cli-raw-print-links has been created
        at  e5385c3887b387731f729787c955e21c06f47847 (commit)

- Log -----------------------------------------------------------------
commit 48bdc02dbe81054f2d90445edce0eb6efb5d311e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 1 19:27:53 2012 +0800

    force to use rawprint to show ticket links
    
    because prettyshow doesn't handle links output

diff --git a/bin/rt.in b/bin/rt.in
index 5e1c053..85135b6 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -420,7 +420,7 @@ sub show {
         }
         elsif (my $spec = is_object_spec($_, $type)) {
             push @objects, $spec;
-            $rawprint = 1 if $_ =~ /\/content$/ or $_ !~ /^ticket/;
+            $rawprint = 1 if $_ =~ /\/content$/ or $_ =~ /\/links/ or $_ !~ /^ticket/;
         }
         else {
             my $datum = /^-/ ? "option" : "argument";

commit e5385c3887b387731f729787c955e21c06f47847
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 1 19:43:30 2012 +0800

    test show links from cli without specifying format

diff --git a/t/web/command_line.t b/t/web/command_line.t
index 1fed8e6..394daab 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -3,7 +3,7 @@
 use strict;
 use File::Spec ();
 use Test::Expect;
-use RT::Test tests => 303, actual_server => 1;
+use RT::Test tests => 315, actual_server => 1;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 use RT::User;
@@ -480,6 +480,8 @@ expect_like(qr/Merged into ticket #$merge_ticket_A by root/, 'Merge recorded in
         expect_like(qr/Created link $link1_id $reln $link2_id/, 'Linked');
         expect_send("show -s ticket/$link1_id/links", "Checking creation of $reln...");
         expect_like(qr/$display_relns{$reln}: [\w\d\.\-]+:\/\/[\w\d\.]+\/ticket\/$link2_id/, "Created link $reln");
+        expect_send("show ticket/$link1_id/links", "Checking show links without format");
+        expect_like(qr/$display_relns{$reln}: [\w\d\.\-]+:\/\/[\w\d\.]+\/ticket\/$link2_id/, "Found link $reln");
 
         # delete link
         expect_send("link -d $link1_id $reln $link2_id", "Delete $reln...");

-----------------------------------------------------------------------


More information about the Rt-commit mailing list