diff options
author | Eric Wong <e@80x24.org> | 2016-06-25 21:29:43 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-25 21:29:43 +0000 |
commit | 073efc43a68cbd6852939ccaf644dbb380cdc143 (patch) | |
tree | ba2a9a30438dec53aaa435443a6dd9adfee30dfc /t | |
parent | 13eda978e8937065575623d045f78592cbb6d022 (diff) | |
download | public-inbox-073efc43a68cbd6852939ccaf644dbb380cdc143.tar.gz |
Angle brackets around the --in-reply-to= arg for git send-email has been optional since git v1.5.3.2, so strip them and make the command-line argument easier-to-type.
Diffstat (limited to 't')
-rw-r--r-- | t/view.t | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -4,8 +4,20 @@ use strict; use warnings; use Test::More; use Email::MIME; -use PublicInbox::View; use Plack::Util; +use_ok 'PublicInbox::View'; + +my @q = ( + 'foo@bar', 'foo@bar', + 'a b', "'a b'", + "a'b", "'a'\\''b'", +); +while (@q) { + my $input = shift @q; + my $expect = shift @q; + my $res = PublicInbox::View::squote_maybe($input); + is($res, $expect, "quote $input => $res"); +} # FIXME: make this test less fragile my $ctx = { |