about summary refs log tree commit homepage
path: root/t/view.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-27 04:34:01 +0000
committerEric Wong <e@80x24.org>2015-08-27 06:04:51 +0000
commit9a2931759c3dcbd879728b49151aa3f8a641b506 (patch)
tree001d6823d7d9d143d3494ad8376d624ea1ca6afc /t/view.t
parente3c3cde22f57bf16bc47c50d8f9ac02416975cd3 (diff)
downloadpublic-inbox-9a2931759c3dcbd879728b49151aa3f8a641b506.tar.gz
These URLs are preferable in case somebody decides to get cute and
use a suffix we would've used to prevent others from linking to
their message.  The common /m/$MESSAGE_ID/ URLs are now 4 characters
shorter so may fit better on terminals.
Diffstat (limited to 't/view.t')
-rw-r--r--t/view.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/view.t b/t/view.t
index 151fa77f..77cf3a32 100644
--- a/t/view.t
+++ b/t/view.t
@@ -44,17 +44,18 @@ EOF
         my $html = PublicInbox::View::msg_html(undef, $mime);
 
         # ghetto tests
-        like($html, qr!<a\nhref="\.\./m/hello%40!s, "MID link present");
+        like($html, qr!<a\nhref="\.\./\.\./m/hello%40!s, "MID link present");
         like($html, qr/hello world\b/, "body present");
         like($html, qr/&gt; keep this inline/, "short quoted text is inline");
         like($html, qr/<a\nid=[^>]+><\/a>&gt; Long and wordy/,
                 "long quoted text is anchored");
 
         # short page
-        my $pfx = "http://example.com/test/f";
+        my $pfx = "../../f/hello%40example.com/";
         $mime = Email::MIME->new($s);
         my $short = PublicInbox::View::msg_html(undef, $mime, $pfx);
-        like($short, qr!<a\nhref="hello%40!s, "MID link present");
+        like($short, qr!<a\nhref="\.\./\.\./f/hello%40example\.com/!s,
+                "MID link present");
         like($short, qr/\n&gt; keep this inline/,
                 "short quoted text is inline");
         like($short, qr/<a\nhref="\Q$pfx\E#[^>]+>Long and wordy/,