summaryrefslogtreecommitdiff
path: root/unittests/ADT
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT')
-rw-r--r--unittests/ADT/StringRefTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/unittests/ADT/StringRefTest.cpp b/unittests/ADT/StringRefTest.cpp
index ea1d26cb60..dfa208abef 100644
--- a/unittests/ADT/StringRefTest.cpp
+++ b/unittests/ADT/StringRefTest.cpp
@@ -143,6 +143,11 @@ TEST(StringRefTest, Split2) {
StringRef(",").split(parts, ",", -1, true);
EXPECT_TRUE(parts == expected);
+ expected.clear(); parts.clear();
+ expected.push_back("a"); expected.push_back("b");
+ StringRef("a,b").split(parts, ",", -1, true);
+ EXPECT_TRUE(parts == expected);
+
// Test MaxSplit
expected.clear(); parts.clear();
expected.push_back("a,,b,c");