* [PATCH] view: consistent ordering of Cc: addresses
@ 2015-08-12 22:41 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-08-12 22:41 UTC (permalink / raw)
To: meta
This fixes a minor test failure in t/cgi.t
Tested with perl 5.18.2-2ubuntu1 on Ubuntu 14.04.3 LTS
---
lib/PublicInbox/View.pm | 2 +-
t/cgi.t | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index c0f3e9f..30759a3 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -349,7 +349,7 @@ sub html_footer {
$to = uri_escape_utf8($to);
$subj = uri_escape_utf8($subj);
- my $cc = uri_escape_utf8(join(',', values %cc));
+ my $cc = uri_escape_utf8(join(',', sort values %cc));
my $href = "mailto:$to?In-Reply-To=$irp&Cc=${cc}&Subject=$subj";
my $idx = $standalone ? " <a\nhref=\"../\">index</a>" : '';
diff --git a/t/cgi.t b/t/cgi.t
index b59ca54..a16ebd8 100644
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -120,7 +120,9 @@ EOF
like($res->{head}, qr/Status: 200 OK/, "index returns 200");
my $idx = cgi_run("/test/index.html");
- $idx->{body} =~ s!/index.html(\?r=)!/$1!; # dirty...
+ $idx->{body} =~ s!/index.html(\?r=)!/$1!g; # dirty...
+ $idx->{body} = [ split(/\n/, $idx->{body}) ];
+ $res->{body} = [ split(/\n/, $res->{body}) ];
is_deeply($res, $idx,
'/$LISTNAME/ and /$LISTNAME/index.html are nearly identical');
# more checks in t/feed.t
--
2.5.0.rc1.33.g9b79a96
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-12 22:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12 22:41 [PATCH] view: consistent ordering of Cc: addresses Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).