diff options
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r-- | llvm/unittests/Support/CommandLineTest.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 4bfa8a3..a7aee41 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -185,7 +185,7 @@ TEST(CommandLineTest, TokenizeGNUCommandLine) { array_lengthof(Output)); } -TEST(CommandLineTest, TokenizeWindowsCommandLine) { +TEST(CommandLineTest, TokenizeWindowsCommandLine1) { const char Input[] = "a\\b c\\\\d e\\\\\"f g\" h\\\"i j\\\\\\\"k \"lmn\" o pqr " "\"st \\\"u\" \\v"; const char *const Output[] = { "a\\b", "c\\\\d", "e\\f g", "h\"i", "j\\\"k", @@ -194,6 +194,13 @@ TEST(CommandLineTest, TokenizeWindowsCommandLine) { array_lengthof(Output)); } +TEST(CommandLineTest, TokenizeWindowsCommandLine2) { + const char Input[] = "clang -c -DFOO=\"\"\"ABC\"\"\" x.cpp"; + const char *const Output[] = { "clang", "-c", "-DFOO=\"ABC\"", "x.cpp"}; + testCommandLineTokenizer(cl::TokenizeWindowsCommandLine, Input, Output, + array_lengthof(Output)); +} + TEST(CommandLineTest, TokenizeConfigFile1) { const char *Input = "\\"; const char *const Output[] = { "\\" }; |