From 3da1fe6d2fb07f3f361482d8056e36636dcec3f5 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 2 Feb 2010 12:03:26 -0500 Subject: Implement #if. --- tests/dimension/directives.pov | 14 +++++++++----- tests/dimension/directives.sh | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/dimension/directives.pov b/tests/dimension/directives.pov index 95ad88a..1bb712d 100644 --- a/tests/dimension/directives.pov +++ b/tests/dimension/directives.pov @@ -26,9 +26,13 @@ #declare Unused = -1; #undef Unused -sphere { - Center, R - pigment { - color Color green 1 +#if (#if (1 = 1) 0 #end = 0 & 0) + Illegal +#else + sphere { + Center, R + pigment { + color Color green 1 + } } -} +#end diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh index b2c9e9e..955ea15 100755 --- a/tests/dimension/directives.sh +++ b/tests/dimension/directives.sh @@ -26,12 +26,16 @@ directives_exp="$(echo -n \ #local (identifier "Color") = rgb < (integer "1") , (integer "0") , (integer "1") > ; #declare (identifier "Unused") = - (integer "1") ; #undef (identifier "Unused") - sphere { - (identifier "Center") , (identifier "R") - pigment { - color (identifier "Color") green (integer "1") + #if \( #if \( (integer "1") = (integer "1") \) (integer "0") #end = (integer "0") & (integer "0") \) + (identifier "Illegal") + #else + sphere { + (identifier "Center") , (identifier "R") + pigment { + color (identifier "Color") green (integer "1") + } } - })' \ + #end)' \ | tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g') $(echo -n \ '((sphere -- cgit v1.2.3