Report category names via the xml help output (but not, yet,
during 'normal' help output).

R=ncalvin
DELTA=3  (3 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3066


git-svn-id: http://gflags.googlecode.com/svn/trunk/src@63 6586e3c6-dcc4-952a-343f-ff74eb82781d
diff --git a/gflags_reporting.cc b/gflags_reporting.cc
index 8afcb95..f280fad 100644
--- a/gflags_reporting.cc
+++ b/gflags_reporting.cc
@@ -212,6 +212,7 @@
   AddXMLTag(&r, "file", flag.filename);
   AddXMLTag(&r, "name", flag.name);
   AddXMLTag(&r, "meaning", flag.description);
+  AddXMLTag(&r, "categories", flag.categories);
   AddXMLTag(&r, "default", flag.default_value);
   AddXMLTag(&r, "current", flag.current_value);
   AddXMLTag(&r, "type", flag.type);
diff --git a/gflags_unittest.sh b/gflags_unittest.sh
index c81e41e..61ad72a 100755
--- a/gflags_unittest.sh
+++ b/gflags_unittest.sh
@@ -182,6 +182,8 @@
 # xml!
 Expect $LINENO 1 "/gflags_unittest.cc</file>" \
   "/gflags_unittest.cc:" --helpxml
+Expect $LINENO 1 "<name>test_bool</name><meaning>tests bool-ness</meaning><categories>important,has_category</categories><default>false</default><current>false</current><type>bool</type>" \
+  "/gflags_unittest.cc:" --helpxml
 
 # just print the version info and exit
 Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" --version