summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2017-06-30 10:49:12 +0100
committerJunio C Hamano <gitster@pobox.com>2017-06-30 08:05:15 -0700
commit3f9c637ec7c28dc9de5937b45334ee11875e9fe8 (patch)
treeb9966a7504aa5cda5941ee82a16761afc78c44f9
parentd5f28b724192e9172d0a013dd7b2ca20fd1bbb9b (diff)
downloadgit-3f9c637ec7c28dc9de5937b45334ee11875e9fe8.tar.gz
t9700: add tests for Git::unquote_path()pw/unquote-path-in-git-pm
Check that unquote_path() handles spaces and escape sequences properly. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t9700/test.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
index 1b75c91965..34cd01366f 100755
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
@@ -133,6 +133,13 @@ close TEMPFILE3;
unlink $tmpfile3;
chdir($abs_repo_dir);
+# unquoting paths
+is(Git::unquote_path('abc'), 'abc', 'unquote unquoted path');
+is(Git::unquote_path('"abc def"'), 'abc def', 'unquote simple quoted path');
+is(Git::unquote_path('"abc\"\\\\ \a\b\t\n\v\f\r\001\040"'),
+ "abc\"\\ \x07\x08\x09\x0a\x0b\x0c\x0d\x01 ",
+ 'unquote escape sequences');
+
printf "1..%d\n", Test::More->builder->current_test;
my $is_passing = eval { Test::More->is_passing };