about summary refs log tree commit homepage
path: root/t/git.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-18 10:21:40 +0000
committerEric Wong <e@80x24.org>2019-01-19 03:34:54 +0000
commitc8a4111320aaed484deecbbc7d1f63f38f3dc57b (patch)
treefb4928c875a279ac14ebf7c675907bc6472d051a /t/git.t
parent8d1766ef6c1ed2a390fe0313f9b8e34475c1d874 (diff)
downloadpublic-inbox-c8a4111320aaed484deecbbc7d1f63f38f3dc57b.tar.gz
It'll be helpful for displaying progress in SolverGit
output.
Diffstat (limited to 't/git.t')
-rw-r--r--t/git.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/git.t b/t/git.t
index 2d58a106..9c80fbb4 100644
--- a/t/git.t
+++ b/t/git.t
@@ -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();