Test for bug 1192 - brace expansion.
Commit 968d1c3 (Portability) introduced a bug with some very POSIX
compliant shells (eg dash), which don't do brace expansion. So add a
test for that.
The test runs by adding a new protocol in Uri, sh+cp://path/. This
protocol is not intended to be used normally, but is only for testing
the push and pull code.
Signed-off-by: Russell Steicke <russells@adelie.cx>
This commit is contained in:
committed by
Paul Beckingham
parent
983e07ab01
commit
0cc7bc337d
11
src/Uri.cpp
11
src/Uri.cpp
@@ -197,6 +197,10 @@ std::string Uri::ToString ()
|
||||
if (is_local ())
|
||||
return _data;
|
||||
|
||||
// No password to obscure, return the original.
|
||||
if (_protocol == "sh+cp")
|
||||
return _data;
|
||||
|
||||
std::string result;
|
||||
result = _protocol + "://";
|
||||
|
||||
@@ -256,6 +260,13 @@ void Uri::parse ()
|
||||
pathDelimiter = ":";
|
||||
}
|
||||
|
||||
if (_protocol == "sh+cp")
|
||||
{
|
||||
_path = _data;
|
||||
_parsed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// user delimited by single quotes?
|
||||
if ( _data[0] == '\''
|
||||
&& (pos = _data.find("'", 1)) != std::string::npos )
|
||||
|
||||
Reference in New Issue
Block a user