about summary refs log tree commit homepage
path: root/t/www_listing.t
diff options
authorEric Wong <e@yhbt.net>2020-05-28 18:37:08 +0000
committerEric Wong <e@yhbt.net>2020-05-29 19:01:04 +0000
commit846161e3d1207d59f62b3a6718221d6f5ba2b94f (patch)
treeaa6a2807f842f36389daa9790864fd9b7f2ae36a /t/www_listing.t
parentace6491217a6aa894ca82c967c42f1df168d7855 (diff)
gitweb does the same with $GIT_DIR/description and gitweb.owner.

Allowing UTF-8 description should not cause problems when used
in responses for to the NNTP "LIST NEWSGROUPS" request, either,
since RFC 3977 section 7.6.6 recommends the description be UTF-8
(but does not require it).

Link: https://public-inbox.org/meta/20200528151216.l7vmnmrs4ojw372g@sourcephile.fr/
Diffstat (limited to 't/www_listing.t')
1 files changed, 3 insertions, 2 deletions
diff --git a/t/www_listing.t b/t/www_listing.t
index 31d76356..0aededd4 100644
--- a/t/www_listing.t
+++ b/t/www_listing.t
@@ -46,7 +46,7 @@ sub tiny_test {
         unlike($tmp, qr/"modified":\s*"/, 'modified is an integer');
         my $manifest = $json->decode($tmp);
         ok(my $clone = $manifest->{'/alt'}, '/alt in manifest');
-        is($clone->{owner}, 'lorelei', 'owner set');
+        is($clone->{owner}, "lorelei \x{100}", 'owner set');
         is($clone->{reference}, '/bare', 'reference detected');
         is($clone->{description}, "we're all clones", 'description read');
         ok(my $bare = $manifest->{'/bare'}, '/bare in manifest');
@@ -88,7 +88,8 @@ SKIP: {
         open $fh, '>', "$alt/description" or die;
         print $fh "we're all clones\n" or die;
         close $fh or die;
-        is(xsys('git', "--git-dir=$alt", qw(config gitweb.owner lorelei)), 0,
+        is(xsys('git', "--git-dir=$alt", qw(config gitweb.owner),
+                "lorelei \xc4\x80"), 0,
                 'set gitweb user');
         ok(unlink("$bare->{git_dir}/description"), 'removed bare/description');
         open $fh, '>', $cfgfile or die;