diff options
author | Eric Wong <e@80x24.org> | 2019-01-18 10:21:40 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-01-19 03:34:54 +0000 |
commit | c8a4111320aaed484deecbbc7d1f63f38f3dc57b (patch) | |
tree | fb4928c875a279ac14ebf7c675907bc6472d051a /t | |
parent | 8d1766ef6c1ed2a390fe0313f9b8e34475c1d874 (diff) | |
download | public-inbox-c8a4111320aaed484deecbbc7d1f63f38f3dc57b.tar.gz |
It'll be helpful for displaying progress in SolverGit output.
Diffstat (limited to 't')
-rw-r--r-- | t/git.t | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -144,11 +144,16 @@ if ('alternates reloaded') { is($$found, $config, 'alternates reloaded'); } -use_ok 'PublicInbox::Git', qw(git_unquote); +use_ok 'PublicInbox::Git', qw(git_unquote git_quote); my $s; is("foo\nbar", git_unquote($s = '"foo\\nbar"'), 'unquoted newline'); is("Eléanor", git_unquote($s = '"El\\303\\251anor"'), 'unquoted octal'); is(git_unquote($s = '"I\"m"'), 'I"m', 'unquoted dq'); is(git_unquote($s = '"I\\m"'), 'I\\m', 'unquoted backslash'); +is(git_quote($s = "Eléanor"), '"El\\303\\251anor"', 'quoted octal'); +is(git_quote($s = "hello\"world"), '"hello\"world"', 'quoted dq'); +is(git_quote($s = "hello\\world"), '"hello\\\\world"', 'quoted backslash'); +is(git_quote($s = "hello\nworld"), '"hello\\nworld"', 'quoted LF'); + done_testing(); |