diff options
author | Eric Wong <e@yhbt.net> | 2020-01-19 09:40:51 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-23 23:04:04 +0000 |
commit | c242a28351d3a9a39224d35031d71afc02993c7a (patch) | |
tree | 55fd78496cbb7547b60be2f2b0d16e72f240ee92 /t/solver_git.t | |
parent | b33f080dc286beb160ce25858cd98010cb836a7e (diff) | |
download | public-inbox-c242a28351d3a9a39224d35031d71afc02993c7a.tar.gz |
We need to escape wide characters when making attribute names from filename-looking things in diffstats.
Diffstat (limited to 't/solver_git.t')
-rw-r--r-- | t/solver_git.t | 11 |
1 files changed, 10 insertions, 1 deletions
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!>Ω</a>!, 'omega escaped'); + + $res = $cb->(GET("/$name/3435775/s/")); is($res->code, 200, 'success with existing blob'); $res = $cb->(GET("/$name/".('0'x40).'/s/')); |