From 3f660a9b219b03bd5188cd4f0da9a58f507a933a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 2 Feb 2010 22:45:20 -0500 Subject: Support #ifdef and #ifndef. --- tests/dimension/directives.pov | 4 ++++ tests/dimension/directives.sh | 3 +++ 2 files changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/dimension/directives.pov b/tests/dimension/directives.pov index 187189f..94e613f 100644 --- a/tests/dimension/directives.pov +++ b/tests/dimension/directives.pov @@ -26,6 +26,10 @@ #declare Unused = -1; #undef Unused +#ifdef (Unused) + Illegal +#end + #if (#if (1 = 1) 0 #end = 0 & 0) `Illegal #else diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh index e24a62a..198e25b 100755 --- a/tests/dimension/directives.sh +++ b/tests/dimension/directives.sh @@ -26,6 +26,9 @@ directives_exp="$(echo -n \ #local (identifier "Color") = rgb < (integer "1") , (integer "0") , (integer "1") > ; #declare (identifier "Unused") = - (integer "1") ; #undef (identifier "Unused") + #ifdef \( (identifier "Unused") \) + (identifier "Illegal") + #end #if \( #if \( (integer "1") = (integer "1") \) (integer "0") #end = (integer "0") & (integer "0") \) error (identifier "Illegal") #else -- cgit v1.2.3