summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2018-11-13 14:17:43 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2018-11-13 14:17:43 (GMT)
commitd3ea98a8c3ea1782eaead13259c83afcf02d8090 (patch)
tree81741e845279af1d9e376cb5ef52f558f1b2854b
parent16e3a45b87ee4dc32ddd8e26ca6dba942e4721da (diff)
downloadNinja-d3ea98a8c3ea1782eaead13259c83afcf02d8090.zip
Ninja-d3ea98a8c3ea1782eaead13259c83afcf02d8090.tar.gz
Ninja-d3ea98a8c3ea1782eaead13259c83afcf02d8090.tar.bz2
Add unit test for #1491
-rw-r--r--src/util_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util_test.cc b/src/util_test.cc
index b4b7516..d97b48c 100644
--- a/src/util_test.cc
+++ b/src/util_test.cc
@@ -419,10 +419,12 @@ TEST(StripAnsiEscapeCodes, StripColors) {
TEST(ElideMiddle, NothingToElide) {
string input = "Nothing to elide in this short string.";
EXPECT_EQ(input, ElideMiddle(input, 80));
+ EXPECT_EQ(input, ElideMiddle(input, 38));
}
TEST(ElideMiddle, ElideInTheMiddle) {
string input = "01234567890123456789";
string elided = ElideMiddle(input, 10);
EXPECT_EQ("012...789", elided);
+ EXPECT_EQ("01234567...23456789", ElideMiddle(input, 19));
}