From 08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 26 Jun 2017 20:32:52 +0000 Subject: Vendor import of llvm trunk r306325: https://llvm.org/svn/llvm-project/llvm/trunk@306325 --- unittests/Support/CommandLineTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'unittests/Support/CommandLineTest.cpp') diff --git a/unittests/Support/CommandLineTest.cpp b/unittests/Support/CommandLineTest.cpp index f9dc3930df8c..660df11446ac 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 @@ -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 = -- cgit v1.2.3