about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-19 09:40:51 +0000
committerEric Wong <e@yhbt.net>2020-01-23 23:04:04 +0000
commitc242a28351d3a9a39224d35031d71afc02993c7a (patch)
tree55fd78496cbb7547b60be2f2b0d16e72f240ee92 /t
parentb33f080dc286beb160ce25858cd98010cb836a7e (diff)
downloadpublic-inbox-c242a28351d3a9a39224d35031d71afc02993c7a.tar.gz
We need to escape wide characters when making attribute names from
filename-looking things in diffstats.
Diffstat (limited to 't')
-rw-r--r--t/solve/0001-simple-mod.patch2
-rw-r--r--t/solver_git.t11
2 files changed, 12 insertions, 1 deletions
diff --git a/t/solve/0001-simple-mod.patch b/t/solve/0001-simple-mod.patch
index c6bb1575..c55fe310 100644
--- a/t/solve/0001-simple-mod.patch
+++ b/t/solve/0001-simple-mod.patch
@@ -3,9 +3,11 @@ To: meta@public-inbox.org
 Subject: [PATCH] TODO: take expert web design advice
 Date: Mon, 1 Apr 2019 08:15:20 +0000
 Message-Id: <20190401081523.16213-1-BOFH@YHBT.net>
+Content-Type: text/plain; charset=utf-8
 
 ---
  TODO | 2 ++
+ Ω    | 5 --
  1 file changed, 2 insertions(+)
 
 diff --git a/TODO b/TODO
diff --git a/t/solver_git.t b/t/solver_git.t
index 92402c3a..92c07334 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -154,7 +154,16 @@ EOF
         my $non_existent = 'ee5e32211bf62ab6531bdf39b84b6920d0b6775a';
         my $client = sub {
                 my ($cb) = @_;
-                my $res = $cb->(GET("/$name/3435775/s/"));
+                my $mid = '20190401081523.16213-1-BOFH@YHBT.net';
+                my @warn;
+                my $res = do {
+                        local $SIG{__WARN__} = sub { push @warn, @_ };
+                        $cb->(GET("/$name/$mid/"));
+                };
+                is_deeply(\@warn, [], 'no warnings from rendering diff');
+                like($res->content, qr!>&#937;</a>!, 'omega escaped');
+
+                $res = $cb->(GET("/$name/3435775/s/"));
                 is($res->code, 200, 'success with existing blob');
 
                 $res = $cb->(GET("/$name/".('0'x40).'/s/'));