mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 13:46:22 +00:00
Use TRUE/FALSE for typeless option values in --help. Update parse_options.sh lib in Bash tools.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
plan 78
|
||||
plan 80
|
||||
|
||||
TMPFILE="$TEST_PT_TMPDIR/parse-opts-output"
|
||||
TOOL="pt-stalk"
|
||||
@@ -121,6 +121,19 @@ cmd_ok \
|
||||
"grep -q 'Exit if the disk is less than this %full.' $TMPFILE" \
|
||||
"Don't interpolate --help descriptions"
|
||||
|
||||
# TRUE/FALSE for typeless options, like the Perl tools.
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/954990
|
||||
parse_options "$BIN_DIR/pt-stalk" --help
|
||||
usage_or_errors "$BIN_DIR/pt-stalk" >$TMPFILE 2>&1
|
||||
|
||||
cmd_ok \
|
||||
"grep -q '\-\-stalk[ ][ ]*TRUE' $TMPFILE" \
|
||||
"TRUE for specified option in --help"
|
||||
|
||||
cmd_ok \
|
||||
"grep -q '\-\-version[ ][ ]*FALSE' $TMPFILE" \
|
||||
"FALSE for non-specified option in --help"
|
||||
|
||||
# ###########################################################################
|
||||
# Config files.
|
||||
# ###########################################################################
|
||||
|
Reference in New Issue
Block a user