diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2009-08-10 23:11:15 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2009-08-10 23:11:15 +0100 |
commit | e0005ca5bd530673db7f4c43d2b835ccde8f0e0d (patch) | |
tree | 37028e810f4f31bd800fd8e057884e11f222a2d2 /test | |
parent | 1a3720699ec9c3ce20e90852e16233922fad9c66 (diff) | |
download | schroot-e0005ca5bd530673db7f4c43d2b835ccde8f0e0d.tar.gz |
test: Print key and value for keyfile and env
When checking keyfiles and environments print the value of the
missing or additional key and value pairs.
Signed-off-by: Roger Leigh <rleigh@debian.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-sbuild-chroot.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/test/test-sbuild-chroot.h b/test/test-sbuild-chroot.h index 4a4eaf40..6257d271 100644 --- a/test/test-sbuild-chroot.h +++ b/test/test-sbuild-chroot.h @@ -277,10 +277,15 @@ public: std::back_inserter(missing)); if (!missing.empty()) { + std::string value; for (sbuild::string_list::const_iterator pos = missing.begin(); pos != missing.end(); ++pos) - std::cout << "Missing environment: " << *pos << std::endl; + { + expected_environment.get(*pos, value); + std::cout << "Missing environment: " + << *pos << "=" << value << std::endl; + } } CPPUNIT_ASSERT(missing.empty()); @@ -290,10 +295,15 @@ public: std::back_inserter(extra)); if (!extra.empty()) { + std::string value; for (sbuild::string_list::const_iterator pos = extra.begin(); pos != extra.end(); ++pos) - std::cout << "Additional environment: " << *pos << std::endl; + { + observed_environment.get(*pos, value); + std::cout << "Additional environment: " + << *pos << "=" << value << std::endl; + } } CPPUNIT_ASSERT(extra.empty()); @@ -347,10 +357,15 @@ public: std::back_inserter(missing)); if (!missing.empty()) { + std::string value; for (sbuild::string_list::const_iterator pos = missing.begin(); pos != missing.end(); ++pos) - std::cout << "Missing keys: " << *pos << std::endl; + { + expected_keyfile.get_value(expected_group, *pos, value); + std::cout << "Missing keys: " + << *pos << "=" << value << std::endl; + } } CPPUNIT_ASSERT(missing.empty()); @@ -360,10 +375,15 @@ public: std::back_inserter(extra)); if (!extra.empty()) { + std::string value; for (sbuild::string_list::const_iterator pos = extra.begin(); pos != extra.end(); ++pos) - std::cout << "Additional keys: " << *pos << std::endl; + { + observed_keyfile.get_value(observed_group, *pos, value); + std::cout << "Additional keys: " + << *pos << "=" << value << std::endl; + } } CPPUNIT_ASSERT(extra.empty()); |