summaryrefslogtreecommitdiffstats
path: root/tests/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-11 20:32:24 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-11 20:43:32 -0500
commitcf4f6e6da179114b3d7cfc564889401485b57fdf (patch)
tree9fb122a0631fd2285cc0f72b91a0e4314d8a1abe /tests/dimension
parenta2b5336d126a95b58527151584c249876d50f0e8 (diff)
downloaddimension-cf4f6e6da179114b3d7cfc564889401485b57fdf.tar.xz
Support stream directives.
Diffstat (limited to 'tests/dimension')
-rw-r--r--tests/dimension/directives.pov9
-rwxr-xr-xtests/dimension/directives.sh8
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/dimension/directives.pov b/tests/dimension/directives.pov
index 75c8a81..5137cd2 100644
--- a/tests/dimension/directives.pov
+++ b/tests/dimension/directives.pov
@@ -21,6 +21,9 @@
#version 3.6;
+#debug "debug"
+#warning "warning"
+
#include "directives.inc"
#declare R = 1;
@@ -30,17 +33,17 @@
#undef Unused
#ifdef (Local)
- Illegal
+ #error "Local escaped from include file"
#end
#ifdef (Unused)
- Illegal
+ #error "#undef failed"
#end
#declare Counter = 0;
#while (Counter < 2)
#if (#if (1 = 1) 0 #end = 0 & 0)
- `Illegal
+ #error "Nested #if parsing failed"
#else
sphere {
Center + <0, Counter, 0>, R
diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh
index 7f15cb5..cf21d8b 100755
--- a/tests/dimension/directives.sh
+++ b/tests/dimension/directives.sh
@@ -22,21 +22,23 @@
directives=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/directives.pov)
directives_exp="$(echo -n \
'(#version (float "3.6") ;
+ #debug (string "debug")
+ #warning (string "warning")
#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")
+ #error (string "Local escaped from include file")
#end
#ifdef \( (identifier "Unused") \)
- (identifier "Illegal")
+ #error (string "#undef failed")
#end
#declare (identifier "Counter") = (integer "0") ;
#while \( (identifier "Counter") < (integer "2") \)
#if \( #if \( (integer "1") = (integer "1") \) (integer "0") #end = (integer "0") & (integer "0") \)
- (error) (identifier "Illegal")
+ #error (string "Nested #if parsing failed")
#else
sphere {
(identifier "Center") + < (integer "0") , (identifier "Counter") , (integer "0") > , (identifier "R")