about summary refs log tree commit homepage
path: root/t/psgi_search.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-19 08:02:33 +0000
committerEric Wong <e@yhbt.net>2020-08-19 08:05:26 +0000
commit86c28d2432292c6bee149f59175486e5610e4462 (patch)
tree9a912e852e40ee6be1280480a20b1f5e362d8fdf /t/psgi_search.t
parent99850fabd5fc628ab29c718e9d7de09b8114b208 (diff)
downloadpublic-inbox-86c28d2432292c6bee149f59175486e5610e4462.tar.gz
There may be messages in the wild with wide characters in
headers which aren't non-RFC2047 encoded.  Assume UTF-8 so
those fields can round trip through over.sqlite3.

This doesn't affect docdata.glass in Xapian, but it does
affect how over.sqlite3 stores the same deflated info.
Diffstat (limited to 't/psgi_search.t')
-rw-r--r--t/psgi_search.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/psgi_search.t b/t/psgi_search.t
index 2d12ba6a..5d537363 100644
--- a/t/psgi_search.t
+++ b/t/psgi_search.t
@@ -28,8 +28,10 @@ my $im = $ibx->importer(0);
 my $digits = '10010260936330';
 my $ua = 'Pine.LNX.4.10';
 my $mid = "$ua.$digits.2460-100000\@penguin.transmeta.com";
+
+# n.b. these headers are not properly RFC2047-encoded
 my $mime = PublicInbox::Eml->new(<<EOF);
-Subject: test
+Subject: test Ævar
 Message-ID: <$mid>
 From: Ævar Arnfjörð Bjarmason <avarab\@example>
 To: git\@vger.kernel.org
@@ -102,6 +104,8 @@ test_psgi(sub { $www->call(@_) }, sub {
                 'subject-less message linked from "/$INBOX/"');
         like($html, qr/\bhref="blank-subject[^>]+>\(no subject\)</,
                 'blank subject message linked from "/$INBOX/"');
+        like($html, qr/test &#198;var/,
+                "displayed Ævar's name properly in topic view");
 
         $res = $cb->(GET('/test/?q=tc:git'));
         like($html, qr/\bhref="no-subject-at-all[^>]+>\(no subject\)</,