summaryrefslogtreecommitdiff
path: root/check/check-define-variable
diff options
context:
space:
mode:
Diffstat (limited to 'check/check-define-variable')
-rwxr-xr-xcheck/check-define-variable15
1 files changed, 11 insertions, 4 deletions
diff --git a/check/check-define-variable b/check/check-define-variable
index b0aaabd..1394f41 100755
--- a/check/check-define-variable
+++ b/check/check-define-variable
@@ -4,15 +4,22 @@ set -e
. ${srcdir}/common
+RESULT="-I/includedir/"
case ${MACHTYPE} in
*-msys)
# Make sure path doesn't get mangled on MSYS
- ARGS="--define-variable=includedir=\\/includedir/ --cflags simple"
+ run_test --define-variable=includedir=\\/includedir/ --cflags simple
;;
*)
- ARGS="--define-variable=includedir=/includedir/ --cflags simple"
+ run_test --define-variable=includedir=/includedir/ --cflags simple
;;
esac
-RESULT="-I/includedir/"
-run_test
+# Spaces before/after the variable name and value should be stripped
+RESULT="bar"
+run_test --define-variable=' foo = bar ' --variable=foo simple
+
+# Should fail when no value set
+EXPECT_RETURN=1
+RESULT="--define-variable argument does not have a value for the variable"
+run_test --define-variable=foo= --variable=foo simple