diff options
Diffstat (limited to 'lld/unittests/DriverTests/WinLinkDriverTest.cpp')
| -rw-r--r-- | lld/unittests/DriverTests/WinLinkDriverTest.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp index d32f22259b4..f4fd29df084 100644 --- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp +++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp @@ -66,6 +66,16 @@ TEST_F(WinLinkParserTest, UnixStyleOption) { EXPECT_EQ("a.obj", inputFile(0)); } +TEST_F(WinLinkParserTest, Quote) { + EXPECT_FALSE(parse("link.exe", "/subsystem:\"console\"", "-out:'a.exe'", + "/defaultlib:'user32.lib'", "'a.obj'", nullptr)); + EXPECT_EQ(llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_CUI, _info.getSubsystem()); + EXPECT_EQ("a.exe", _info.outputPath()); + EXPECT_EQ(2, inputFileCount()); + EXPECT_EQ("a.obj", inputFile(0)); + EXPECT_EQ("user32.lib", inputFile(1)); +} + TEST_F(WinLinkParserTest, Mllvm) { EXPECT_FALSE(parse("link.exe", "-mllvm", "-debug", "a.obj", nullptr)); const std::vector<const char *> &options = _info.llvmOptions(); @@ -205,7 +215,7 @@ TEST_F(WinLinkParserTest, NoInputFiles) { TEST_F(WinLinkParserTest, FailIfMismatch_Match) { EXPECT_FALSE(parse("link.exe", "/failifmismatch:foo=bar", - "/failifmismatch:foo=bar", "/failifmismatch:abc=def", + "/failifmismatch:\"foo=bar\"", "/failifmismatch:abc=def", "a.out", nullptr)); } |

