Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t9700: add tests for Git::unquote_path()
author
Phillip Wood
<phillip.wood@dunelm.org.uk>
Fri, 30 Jun 2017 09:49:12 +0000
(10:49 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 30 Jun 2017 15:05:15 +0000
(08:05 -0700)
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>
t/t9700/test.pl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
d5f28b7
)
diff --git
a/t/t9700/test.pl
b/t/t9700/test.pl
index 1b75c919651a8126e2a327f3d9645d4377823726..34cd01366f92164ffcd712cb86dac4eb1cffa3f5 100755
(executable)
--- a/
t/t9700/test.pl
+++ b/
t/t9700/test.pl
@@
-133,6
+133,13
@@
sub adjust_dirsep {
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 };