summaryrefslogtreecommitdiffstats
path: root/src/build_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build_test.cc')
-rw-r--r--src/build_test.cc33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/build_test.cc b/src/build_test.cc
index f3f5472..c45f2b3 100644
--- a/src/build_test.cc
+++ b/src/build_test.cc
@@ -1024,36 +1024,7 @@ TEST_F(BuildTest, PhonyWithNoInputs) {
ASSERT_EQ(1u, commands_ran_.size());
}
-TEST_F(BuildTest, StatusFormatBufferTooSmall) {
- const int kBUFF_SIZE = 5;
- char buff[kBUFF_SIZE] = { '\0' };
- string err;
-
- EXPECT_EQ(-1, status_.FormatProgressStatus("0123456789",
- buff, kBUFF_SIZE,
- &err));
- EXPECT_EQ("custom NINJA_STATUS exceed buffer size 5", err);
-}
-
-TEST_F(BuildTest, StatusFormatWrongPlaceholder) {
- const int kBUFF_SIZE = 1024;
- char buff[kBUFF_SIZE] = { '\0' };
- string err;
-
- EXPECT_EQ(-1, status_.FormatProgressStatus("[%r/%X]",
- buff, kBUFF_SIZE,
- &err));
- EXPECT_EQ("unknown placeholders '%X' in NINJA_STATUS", err);
-}
-
TEST_F(BuildTest, StatusFormatReplacePlaceholder) {
- const int kBUFF_SIZE = 1024;
- char buff[kBUFF_SIZE] = { '\0' };
- string err;
-
- EXPECT_EQ(18, status_.FormatProgressStatus("[%%/s%s/t%t/r%r/u%u/f%f]",
- buff, kBUFF_SIZE,
- &err));
- EXPECT_EQ("", err);
- EXPECT_STREQ("[%/s0/t0/r0/u0/f0]", buff);
+ EXPECT_EQ("[%/s0/t0/r0/u0/f0]",
+ status_.FormatProgressStatus("[%%/s%s/t%t/r%r/u%u/f%f]"));
}