[CRT_APITEST] Add tests for __getmainargs, testing a commandline ending with spaces. Patch by Yaroslav Veremenko CORE-9199

svn path=/trunk/; revision=72762
This commit is contained in:
Mark Jansen
2016-09-21 19:26:47 +00:00
parent 1d08fd530f
commit 6ee0488c6d
+2
View File
@@ -84,6 +84,7 @@ START_TEST(__getmainargs)
ok_argsA("test.exe a \" b\\ \"\" c", "a", " b\\ \"", "c");
ok_argsA("test.exe a \"b\\ \"\"\" c\" d", "a", "b\\ \" c", "d");
ok_argsA("test.exe a \"b\\ \"\"\" \"c \"\"\"\" d", "a", "b\\ \" c", "\" d");
ok_argsA("test.exe a b c ", "a", "b", "c");
ok_argsW(L"test.exe \"a b c\" d e", L"a b c", L"d", L"e");
ok_argsW(L"test.exe \"ab\\\"c\" \"\\\\\" d", L"ab\"c", L"\\", L"d");
@@ -97,4 +98,5 @@ START_TEST(__getmainargs)
ok_argsW(L"test.exe a \" b\\ \"\" c", L"a", L" b\\ \"", L"c");
ok_argsW(L"test.exe a \"b\\ \"\"\" c\" d", L"a", L"b\\ \" c", L"d");
ok_argsW(L"test.exe a \"b\\ \"\"\" \"c \"\"\"\" d", L"a", L"b\\ \" c", L"\" d");
ok_argsW(L"test.exe a b c ", L"a", L"b", L"c");
}