added test. removed space

This commit is contained in:
Frank Cizmich
2015-01-14 14:36:44 -02:00
parent a7e1975eea
commit 18f85786ba
9 changed files with 22 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
plan 83
plan 84
TMPFILE="$TEST_PT_TMPDIR/parse-opts-output"
TOOL="pt-stalk"
@@ -258,6 +258,19 @@ is "$OPT_NOTIFY_BY_EMAIL" "" "Bug 1038995: --notify-by-email is empty by default
parse_options "$T_LIB_DIR/samples/bash/po005.sh" --notify-by-email foo@bar.com
is "$OPT_NOTIFY_BY_EMAIL" "foo@bar.com" "Bug 1038995: ...but gets set without errors if specified"
# ############################################################################
# Bug 1266869: fails when $HOME unset
# https://bugs.launchpad.net/percona-toolkit/+bug/1266869
# ############################################################################
TMP_HOME="$HOME"
unset HOME
OUTPUT=`parse_options $T_LIB_DIR/samples/bash/po001.sh 2>&1`
echo "$OUTPUT" > "$TMPFILE"
cmd_ok "grep -q -v unbound $TMPFILE" "No error when \$HOME is not set"
HOME="$TMP_HOME" # just in case further tests below need it
# ############################################################################
# Done
# ############################################################################