diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-04 10:29:21 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-16 10:40:26 +0200 |
| commit | 0ab867b7423c311dbeb185dac5fd5f16956000bd (patch) | |
| tree | 3c9fd3167c53c431ddeaf3fdd0a3ac0083ed9768 /validation | |
| parent | ca83186b3bc5ee4392c5a3135aaf319c2ad83730 (diff) | |
| download | sparse-dev-0ab867b7423c311dbeb185dac5fd5f16956000bd.tar.gz | |
testsuite: move verbose() & error()
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rwxr-xr-x | validation/test-suite | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/validation/test-suite b/validation/test-suite index 9e30ed93..5f63a23b 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -72,6 +72,23 @@ EOT } ## +# verbose(string) - prints string if we are in verbose mode +verbose() +{ + [ "$V" -eq "1" ] && echo " $1" + return 0 +} + +## +# error(string[, die]) - prints an error and exits with value die if given +error() +{ + [ "$quiet" -ne 1 ] && echo "error: $1" + [ -n "$2" ] && exit $2 + return 0 +} + +## # helper for has_(each|none)_patterns() has_patterns() { @@ -132,23 +149,6 @@ nbr_patterns() return $? } -## -# verbose(string) - prints string if we are in verbose mode -verbose() -{ - [ "$V" -eq "1" ] && echo " $1" - return 0 -} - -## -# error(string[, die]) - prints an error and exits with value die if given -error() -{ - [ "$quiet" -ne 1 ] && echo "error: $1" - [ -n "$2" ] && exit $2 - return 0 -} - do_usage() { echo "$prog_name - a tiny automatic testing script" |
