aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/test-suite
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-11-23 00:44:10 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-12-08 13:55:21 +0100
commit9b08666540f44f71602813b9e8f01c2f0fe14550 (patch)
treeeb2553d4bc591ea5677d58900222a4280a4512c5 /validation/test-suite
parent2a2b2cbc3d236f844ae09cb32b552640f61db22c (diff)
downloadsparse-dev-9b08666540f44f71602813b9e8f01c2f0fe14550.tar.gz
testsuite: move verbose/error() before get_tag_value()
So, we can use them inside get_tag_value(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/test-suite')
-rwxr-xr-xvalidation/test-suite36
1 files changed, 19 insertions, 17 deletions
diff --git a/validation/test-suite b/validation/test-suite
index 07d9e7fc..f04d8177 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -42,6 +42,25 @@ vquiet=""
quiet=0
abort=0
+
+##
+# 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
+}
+
+
##
# get_tag_value(file) - get the 'check-<...>' tags & values
get_tag_value()
@@ -88,23 +107,6 @@ 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()
{