mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 02:05:23 +00:00
pt-summary for 2.1, also changes to pt-mysql-summary from Daniel's review
This commit is contained in:
29
t/lib/bash/summary_common.sh
Normal file
29
t/lib/bash/summary_common.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
plan 3
|
||||
|
||||
TMPDIR="$TEST_TMPDIR"
|
||||
PATH="$PATH:$PERCONA_TOOLKIT_SANDBOX/bin"
|
||||
|
||||
. "$LIB_DIR/summary_common.sh"
|
||||
|
||||
p="$TMPDIR/get_var_samples"
|
||||
|
||||
echo "test1 abcdef" > "$p"
|
||||
is \
|
||||
"$(get_var test1 "$p")" \
|
||||
"abcdef" \
|
||||
"Sanity check, get_var works"
|
||||
|
||||
echo "test2 abc def" > "$p"
|
||||
is \
|
||||
"$(get_var test2 "$p")" \
|
||||
"abc def" \
|
||||
"get_var works even if the value has spaces"
|
||||
|
||||
echo "test::1 abcdef" > "$p"
|
||||
is \
|
||||
"$(get_var "test::1" "$p")" \
|
||||
"abcdef" \
|
||||
"get_var works if the 'key' has colons"
|
||||
|
Reference in New Issue
Block a user