First Bash parse_options lib with tests.

This commit is contained in:
Daniel Nichter
2011-10-26 10:50:55 -06:00
parent dfad96537e
commit 1ae8661271
5 changed files with 511 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
TESTS=17
source "$LIB_DIR/parse_options.sh"
parse_options "$T_LIB_DIR/samples/bash/po001.sh"
is "$THRESHOLD" "100"
is "$VARIABLE" "Threads_connected"
is "$CYCLES" "1"
is "$GDB" "no"
is "$OPROFILE" "yes"
is "$STRACE" "no"
is "$TCPDUMP" "yes"
is "$EMAIL" ""
is "$INTERVAL" "30"
is "$MAYBE_EMPTY" "no"
is "$COLLECT" "${HOME}/bin/pt-collect"
is "$DEST" "${HOME}/collected/"
is "$DURATION" "30"
is "$SLEEP" "300"
is "$PCT_THRESHOLD" "95"
is "$MB_THRESHOLD" "100"
is "$PURGE" "30"