summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-10 20:42:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-10 20:42:50 (GMT)
commit9bf8e0c73d28eeede51f8d5cb75865eb544e7d47 (patch)
tree856327a74e516198a9999ac23466c48816b6657a /t
parentc4f70d2c9025b6dad34d0833a87d8ac24c221956 (diff)
parent3f9c637ec7c28dc9de5937b45334ee11875e9fe8 (diff)
downloadgit-9bf8e0c73d28eeede51f8d5cb75865eb544e7d47.zip
git-9bf8e0c73d28eeede51f8d5cb75865eb544e7d47.tar.gz
git-9bf8e0c73d28eeede51f8d5cb75865eb544e7d47.tar.bz2
Merge branch 'pw/unquote-path-in-git-pm'
Code refactoring. * pw/unquote-path-in-git-pm: t9700: add tests for Git::unquote_path() Git::unquote_path(): throw an exception on bad path Git::unquote_path(): handle '\a' add -i: move unquote_path() to Git.pm
Diffstat (limited to 't')
-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 1b75c91..34cd013 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 };