already escaped backslash shouldn't escape the following quote in ConvertStringToArgs()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e3276230de
commit
28d4f49b78
@ -1332,7 +1332,7 @@ wxCmdLineParser::ConvertStringToArgs(const wxString& cmdline,
|
||||
break;
|
||||
}
|
||||
|
||||
lastBS = ch == '\\';
|
||||
lastBS = !lastBS && ch == '\\';
|
||||
}
|
||||
else // type == wxCMD_LINE_SPLIT_UNIX
|
||||
{
|
||||
|
@ -96,6 +96,7 @@ void CmdLineTestCase::ConvertStringTestCase()
|
||||
WX_ASSERT_ARGS_EQUAL( "1|2 3|4", "1 \"2 3\" 4" );
|
||||
|
||||
// check for (broken) Windows semantics: backslash doesn't escape spaces
|
||||
WX_ASSERT_DOS_ARGS_EQUAL( "\\\\foo\\\\|/bar", "\"\\\\foo\\\\\" /bar" );
|
||||
WX_ASSERT_DOS_ARGS_EQUAL( "foo|bar\\|baz", "foo bar\\ baz" );
|
||||
WX_ASSERT_DOS_ARGS_EQUAL( "foo|bar\\\"baz", "foo \"bar\\\"baz\"" );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user