diff options
Diffstat (limited to 'src/gflags_unittest.sh')
-rwxr-xr-x | src/gflags_unittest.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gflags_unittest.sh b/src/gflags_unittest.sh index cb214b8..b14064c 100755 --- a/src/gflags_unittest.sh +++ b/src/gflags_unittest.sh @@ -150,8 +150,8 @@ Expect $LINENO 1 "/gflags_unittest.cc" "/gflags.cc" \ --helpon gflags_unittest # helpmatch is like helpon but takes substrings -Expect $LINENO 1 "/gflags_unittest.cc" "/gflags.cc" \ - -helpmatch _ +Expect $LINENO 1 "/gflags_reporting.cc" "/gflags_unittest.cc" \ + -helpmatch reporting Expect $LINENO 1 "/gflags_unittest.cc" "/gflags.cc" \ -helpmatch=unittest @@ -208,12 +208,15 @@ Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" \ Expect $LINENO 0 "PASS" "" -- --help # Make sure boolean flags gives warning when type of default value is not bool -Expect $LINENO 0 "Flag test_bool_string is of type bool, but its default value is not a boolean." -Expect $LINENO 0 "Flag test_bool_float is of type bool, but its default value is not a boolean." -Expect $LINENO 0 "Flag test_bool_int is of type bool, but its default value is not a boolean." +Expect $LINENO 0 "Flag test_bool_string is of type bool, but its default value is not a boolean." "" +Expect $LINENO 0 "Flag test_bool_float is of type bool, but its default value is not a boolean." "" +Expect $LINENO 0 "Flag test_bool_int is of type bool, but its default value is not a boolean." "" # Make sure that boolean flags don't give warning when default value is bool Expect $LINENO 0 "" "Flag test_bool_bool is of type bool, but its default value is not a boolean." +# And we should die if the flag value doesn't pas the validator +Expect $LINENO 1 "ERROR: failed validation of new value 'true' for flag 'always_fail'" "" --always_fail + echo "PASS" exit 0 |