summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-06-30 14:17:17 +0000
committerChris Wilson <chris+github@qwirx.com>2007-06-30 14:17:17 +0000
commitd3fa5137921158e027c5e0d55c1c456723bdd1e7 (patch)
treed16ab938d16dd1bf08ffc8a56ef19c634db44553 /test
parent30879db08edddc827d9dae05aec39061bc64437e (diff)
Make test/bbackupd intercept timer tests a little less strict, because
object IDs can vary depending on the order that readdir() returns files in. (refs #3)
Diffstat (limited to 'test')
-rw-r--r--test/bbackupd/testbbackupd.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 9a4c9919..2b8225cc 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -841,7 +841,8 @@ int test_bbackupd()
{
std::string line;
TEST_THAT(reader.GetLine(line));
- TEST_THAT(line == "Receive Success(0xe)");
+ std::string comp = "Receive Success(0x";
+ TEST_THAT(line.substr(0, comp.size()) == comp);
TEST_THAT(reader.GetLine(line));
TEST_THAT(line == "Receiving stream, size 124");
TEST_THAT(reader.GetLine(line));
@@ -850,9 +851,9 @@ int test_bbackupd()
TEST_THAT(line == "Receive IsAlive()");
TEST_THAT(reader.GetLine(line));
- std::string comp = "Send StoreFile(0x3,";
+ comp = "Send StoreFile(0x3,";
TEST_THAT(line.substr(0, comp.size()) == comp);
- comp = ",0xe,\"f1\")";
+ comp = ",\"f1\")";
TEST_THAT(line.substr(line.size() - comp.size())
== comp);
}
@@ -892,7 +893,8 @@ int test_bbackupd()
{
std::string line;
TEST_THAT(reader.GetLine(line));
- TEST_THAT(line == "Receive Success(0xf)");
+ std::string comp = "Receive Success(0x";
+ TEST_THAT(line.substr(0, comp.size()) == comp);
TEST_THAT(reader.GetLine(line));
TEST_THAT(line == "Receiving stream, size 124");
@@ -902,7 +904,7 @@ int test_bbackupd()
// so there will be no keepalives.
TEST_THAT(reader.GetLine(line));
- std::string comp = "Send StoreFile(0x3,";
+ comp = "Send StoreFile(0x3,";
TEST_THAT(line.substr(0, comp.size()) == comp);
comp = ",0x0,\"f1\")";
TEST_THAT(line.substr(line.size() - comp.size())
@@ -944,7 +946,8 @@ int test_bbackupd()
{
std::string line;
TEST_THAT(reader.GetLine(line));
- TEST_THAT(line == "Receive Success(0x10)");
+ std::string comp = "Receive Success(0x";
+ TEST_THAT(line.substr(0, comp.size()) == comp);
TEST_THAT(reader.GetLine(line));
TEST_THAT(line == "Receiving stream, size 124");
@@ -964,7 +967,7 @@ int test_bbackupd()
TEST_THAT(line == "Receive IsAlive()");
TEST_THAT(reader.GetLine(line));
- std::string comp = "Send StoreFile(0x3,";
+ comp = "Send StoreFile(0x3,";
TEST_THAT(line.substr(0, comp.size()) == comp);
comp = ",0x0,\"f1\")";
TEST_THAT(line.substr(line.size() - comp.size())