tools: include CS config in 'nfdc cs info'

Also, ForwarderGeneralModule::formatItemText now uses ItemAttributes.

refs #4050

Change-Id: I1b2bde29b82e4b3910d87b41efd90e273052b18d
diff --git a/tests/tools/nfdc/cs-module.t.cpp b/tests/tools/nfdc/cs-module.t.cpp
index 7191f7d..33d846a 100644
--- a/tests/tools/nfdc/cs-module.t.cpp
+++ b/tests/tools/nfdc/cs-module.t.cpp
@@ -95,6 +95,9 @@
 
 const std::string STATUS_XML = stripXmlSpaces(R"XML(
   <cs>
+    <capacity>31807</capacity>
+    <admitEnabled/>
+    <nEntries>16131</nEntries>
     <nHits>14363</nHits>
     <nMisses>27462</nMisses>
   </cs>
@@ -102,14 +105,23 @@
 
 const std::string STATUS_TEXT = std::string(R"TEXT(
 CS information:
-  nHits=14363 nMisses=27462
+  capacity=31807
+     admit=on
+     serve=off
+  nEntries=16131
+     nHits=14363
+   nMisses=27462
 )TEXT").substr(1);
 
 BOOST_FIXTURE_TEST_CASE(Status, StatusFixture<CsModule>)
 {
   this->fetchStatus();
   CsInfo payload;
-  payload.setNHits(14363)
+  payload.setCapacity(31807)
+         .setEnableAdmit(true)
+         .setEnableServe(false)
+         .setNEntries(16131)
+         .setNHits(14363)
          .setNMisses(27462);
   this->sendDataset("/localhost/nfd/cs/info", payload);
   this->prepareStatusOutput();
diff --git a/tests/tools/nfdc/format-helpers.t.cpp b/tests/tools/nfdc/format-helpers.t.cpp
index 5de002b..d5719ae 100644
--- a/tests/tools/nfdc/format-helpers.t.cpp
+++ b/tests/tools/nfdc/format-helpers.t.cpp
@@ -48,6 +48,14 @@
                           " surround XML &lt;element&gt; tag name"));
 }
 
+BOOST_AUTO_TEST_CASE(Flag)
+{
+  output_test_stream os;
+  os << "<A>" << xml::Flag{"B", true} << "</A><C>" << xml::Flag{"D", false} << "</C>";
+
+  BOOST_CHECK(os.is_equal("<A><B/></A><C></C>"));
+}
+
 BOOST_AUTO_TEST_CASE(DurationFormatting)
 {
   time::nanoseconds d1 = 53000_s + 87_ms + 3_us;