diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-11 09:47:59 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-08 10:51:02 +0100 |
| commit | e6a832d7210201751d6bc17fa1b44fd24a95d094 (patch) | |
| tree | 9ff0cb9b6191f7ed603b54a8c002e5c16f1bbd49 /validation | |
| parent | 8bcf416415eda1b245d5a7655d1cf30f5040cd0b (diff) | |
| download | sparse-dev-e6a832d7210201751d6bc17fa1b44fd24a95d094.tar.gz | |
testsuite: move up arg_file()
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rwxr-xr-x | validation/test-suite | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/validation/test-suite b/validation/test-suite index 29093fab..59d79918 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -213,6 +213,23 @@ minmax_patterns() return $? } +## +# arg_file(filename) - checks if filename exists +arg_file() +{ + [ -z "$1" ] && { + do_usage + exit 1 + } + [ -e "$1" ] || { + error "Can't open file $1" + exit 1 + } + return 0 +} + + +## do_usage() { echo "$prog_name - a tiny automatic testing script" @@ -457,21 +474,6 @@ _EOF return 0 } -## -# arg_file(filename) - checks if filename exists -arg_file() -{ - [ -z "$1" ] && { - do_usage - exit 1 - } - [ -e "$1" ] || { - error "Can't open file $1" - exit 1 - } - return 0 -} - while true; do case "$1" in -a|--abort) |
