mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 21:51:21 +00:00
Use "yes" for true, "" for false. Use $PO_DIR instead of $TMP_DIR/po. Add and test Baron's code for 'Options and values after processing arguments'. Make --help exit 0 unless there were errors.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TESTS=63
|
||||
TESTS=64
|
||||
|
||||
TMPFILE="$TEST_TMPDIR/parse-opts-output"
|
||||
TOOL="pt-stalk"
|
||||
@@ -105,6 +105,10 @@ cmd_ok \
|
||||
"grep -q \"For more information, 'man pt-stalk' or 'perldoc\" $TMPFILE" \
|
||||
"--help"
|
||||
|
||||
cmd_ok \
|
||||
"grep -q '\-\-string-opt[ ]*(No value)' $TMPFILE" \
|
||||
"Options and values after processing arguments"
|
||||
|
||||
# Don't interpolate.
|
||||
parse_options "$T_LIB_DIR/samples/bash/po003.sh" --help
|
||||
usage_or_errors "$T_LIB_DIR/samples/bash/po003.sh" >$TMPFILE 2>&1
|
||||
|
Reference in New Issue
Block a user