From 13e11b2fafe60cad7d04d80c602adc12d6080036 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 22 Apr 2011 18:24:59 -0400 Subject: Handle symbol aliases in dmnsn_find_symbol() directly. Fixes infinite loops when macro arguments have the same name as existing symbols. --- tests/dimension/directives.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/dimension/directives.sh') diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh index 7c66263..9e3974a 100755 --- a/tests/dimension/directives.sh +++ b/tests/dimension/directives.sh @@ -56,6 +56,17 @@ directives_exp="$(echo -n \ (identifier "Inc") \( (identifier "Counter") \) #end + #declare (identifier "Test1") = (integer "0") ; + #declare (identifier "Test2") = (integer "1") ; + #declare (identifier "Test3") = (integer "2") ; + #macro (identifier "ScopeTest") \( (identifier "Test1") , (identifier "Test2") , (identifier "Test3") \) + #declare (identifier "Test1") = (identifier "Test2") - (identifier "Test3") ; + #end + (identifier "ScopeTest") \( (identifier "Test1") , (identifier "Test3") , (identifier "Test2") \) + sphere { + (integer "0") , (identifier "Test1") + } + #declare (identifier "Box") = box { < - (integer "1") , - (integer "1") , - (integer "1") > , @@ -89,6 +100,11 @@ $(echo -n \ (pigment (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0)) pigment-modifiers))) + (object + (sphere + (vector (integer 0) (integer 0) (integer 0) (integer 0) (integer 0)) + (integer 1)) + object-modifiers) (object (box (vector (integer -1) (integer -1) (integer -1) (integer 0) (integer 0)) -- cgit v1.2.3