summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers+gflags@google.com>2011-11-03 23:09:49 +0000
committerCraig Silverstein <csilvers+gflags@google.com>2011-11-03 23:09:49 +0000
commit29f02f9896a68e597131e2bacc00cd3f6004b358 (patch)
tree04f8f87cd826761eabbcf8bc6a2985291ff9e77e /src
parent10caa99e2d81bb63df4dbf42e5fc9deaee0b6370 (diff)
downloadgflags-29f02f9896a68e597131e2bacc00cd3f6004b358.tar.gz
gflags-29f02f9896a68e597131e2bacc00cd3f6004b358.tar.bz2
gflags-29f02f9896a68e597131e2bacc00cd3f6004b358.zip
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: https://gflags.googlecode.com/svn/trunk@63 6586e3c6-dcc4-952a-343f-ff74eb82781d
Diffstat (limited to 'src')
-rw-r--r--src/gflags_reporting.cc1
-rwxr-xr-xsrc/gflags_unittest.sh2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gflags_reporting.cc b/src/gflags_reporting.cc
index 8afcb95..f280fad 100644
--- a/src/gflags_reporting.cc
+++ b/src/gflags_reporting.cc
@@ -212,6 +212,7 @@ static string DescribeOneFlagInXML(const CommandLineFlagInfo& flag) {
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/src/gflags_unittest.sh b/src/gflags_unittest.sh
index c81e41e..61ad72a 100755
--- a/src/gflags_unittest.sh
+++ b/src/gflags_unittest.sh
@@ -182,6 +182,8 @@ Expect $LINENO 1 "/gflags_reporting.cc" "" --helppackage
# 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