summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/dimension/directives.inc21
-rw-r--r--tests/dimension/directives.pov7
-rwxr-xr-xtests/dimension/directives.sh5
3 files changed, 31 insertions, 2 deletions
diff --git a/tests/dimension/directives.inc b/tests/dimension/directives.inc
new file mode 100644
index 0000000..515b2f5
--- /dev/null
+++ b/tests/dimension/directives.inc
@@ -0,0 +1,21 @@
+/*************************************************************************
+ * Copyright (C) 2010 Tavian Barnes <tavianator@gmail.com> *
+ * *
+ * This file is part of The Dimension Test Suite. *
+ * *
+ * The Dimension Test Suite is free software; you can redistribute it *
+ * and/or modify it under the terms of the GNU General Public License as *
+ * published by the Free Software Foundation; either version 3 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * The Dimension Test Suite is distributed in the hope that it will be *
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
+ *************************************************************************/
+
+#declare Center = 0;
+#local Local = -1;
diff --git a/tests/dimension/directives.pov b/tests/dimension/directives.pov
index b621709..75c8a81 100644
--- a/tests/dimension/directives.pov
+++ b/tests/dimension/directives.pov
@@ -21,13 +21,18 @@
#version 3.6;
-#declare Center = 0;
+#include "directives.inc"
+
#declare R = 1;
#local Color = rgb <1, 0, 1>;
#declare Unused = -1;
#undef Unused
+#ifdef (Local)
+ Illegal
+#end
+
#ifdef (Unused)
Illegal
#end
diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh
index 8d0bbb9..3893acc 100755
--- a/tests/dimension/directives.sh
+++ b/tests/dimension/directives.sh
@@ -22,11 +22,14 @@
directives=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/directives.pov)
directives_exp="$(echo -n \
'(#version (float "3.6") ;
- #declare (identifier "Center") = (integer "0") ;
+ #include (string "directives.inc")
#declare (identifier "R") = (integer "1") ;
#local (identifier "Color") = rgb < (integer "1") , (integer "0") , (integer "1") > ;
#declare (identifier "Unused") = - (integer "1") ;
#undef (identifier "Unused")
+ #ifdef \( (identifier "Local") \)
+ (identifier "Illegal")
+ #end
#ifdef \( (identifier "Unused") \)
(identifier "Illegal")
#end