diff options
Diffstat (limited to 'unittests/Support/CommandLineTest.cpp')
-rw-r--r-- | unittests/Support/CommandLineTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Support/CommandLineTest.cpp b/unittests/Support/CommandLineTest.cpp index f9dc3930df8c6..660df11446acb 100644 --- a/unittests/Support/CommandLineTest.cpp +++ b/unittests/Support/CommandLineTest.cpp @@ -13,6 +13,7 @@ #include "llvm/Config/config.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" +#include "llvm/Support/Program.h" #include "llvm/Support/StringSaver.h" #include "gtest/gtest.h" #include <fstream> @@ -546,6 +547,11 @@ TEST(CommandLineTest, GetRegisteredSubcommands) { } } +TEST(CommandLineTest, ArgumentLimit) { + std::string args(32 * 4096, 'a'); + EXPECT_FALSE(llvm::sys::commandLineFitsWithinSystemLimits("cl", args.data())); +} + TEST(CommandLineTest, ResponseFiles) { llvm::SmallString<128> TestDir; std::error_code EC = |