Test failure when spaces in git root
PATCH 1/1 Test failure when spaces in git root
Some of the svn related tests would break when the git root path had spaces in it.
The test checks in t/t9119-git-svn-info.sh where falsely assuming that the only space where in the path of the generated subversion repository. This will break when the actual git build repository has spaces in it. Add a global modifier to the sed command that generates the expected value for the tests.
--- t/t9119-git-svn-info.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
t/t9119-git-svn-info.sh +1 -1
@@ -28,7 +28,7 @@ test_cmp_info () { rm -f tmp.expect tmp.actual } -quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/')" +quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/g')" test_expect_success 'setup repository and import' ' mkdir info &&
Signature · 1 line
1.7.4.1.99.g3d9132
Quoted 2 lines · Carl Michael Skog
Some of the svn related tests would break when the git root path had spaces in it.
[...]
t/t9119-git-svn-info.sh test_cmp_info () { · line 31
Quoted 2 lines
t/t9119-git-svn-info.sh +1
-1-quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/')" +quoted_svnrepo="$(echo $svnrepo | sed 's/ /%20/g')"
If you're already fixing this, shouldn't it be
$(echo "$svnrepo" | ...)
to stop the expansion process from converting arbitrary series of whitespace into a single space?
However, any other (than space) character that needs %-quoting would probably also break the test. Maybe some more complicated mangling would be in order.
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.ch