From: Phillip Wood Date: Thu, 22 Jun 2017 10:26:21 GMT Subject: [PATCH 4/5] Add tests for Git::unquote_path() Message-ID: <20170622102622.26147-5-phillip.wood@talktalk.net> In-Reply-To: <20170622102622.26147-1-phillip.wood@talktalk.net> From: Phillip Wood Check that unquote_path() handles spaces and escape sequences properly Signed-off-by: Phillip Wood --- t/t9700/test.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 1b75c919651a8126e2a327f3d9645d4377823726..34cd01366f92164ffcd712cb86dac4eb1cffa3f5 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 }; -- 2.13.0