summaryrefslogtreecommitdiffstats
path: root/tests/dimension/directives.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-03 02:38:30 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-03 02:38:30 -0500
commit58bd8b3b09a11ee2f698e21608ef71c65d97f804 (patch)
tree7f2c37c9a14a3ff2842f95897ea485acf96eae89 /tests/dimension/directives.sh
parent3f660a9b219b03bd5188cd4f0da9a58f507a933a (diff)
downloaddimension-58bd8b3b09a11ee2f698e21608ef71c65d97f804.tar.xz
Implement #while.
Diffstat (limited to 'tests/dimension/directives.sh')
-rwxr-xr-xtests/dimension/directives.sh27
1 files changed, 19 insertions, 8 deletions
diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh
index 198e25b..9152d2f 100755
--- a/tests/dimension/directives.sh
+++ b/tests/dimension/directives.sh
@@ -29,15 +29,19 @@ directives_exp="$(echo -n \
#ifdef \( (identifier "Unused") \)
(identifier "Illegal")
#end
- #if \( #if \( (integer "1") = (integer "1") \) (integer "0") #end = (integer "0") & (integer "0") \)
- error (identifier "Illegal")
- #else
- sphere {
- (identifier "Center") , (identifier "R")
- pigment {
- color (identifier "Color") green (integer "1")
+ #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")
+ #else
+ sphere {
+ (identifier "Center") + < (integer "0") , (identifier "Counter") , (integer "0") > , (identifier "R")
+ pigment {
+ color (identifier "Color") green (integer "1")
+ }
}
- }
+ #end
+ #declare (identifier "Counter") = (identifier "Counter") + (integer "1") ;
#end)' \
| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g')
$(echo -n \
@@ -47,6 +51,13 @@ $(echo -n \
(object-modifiers
(texture
(pigment (color (integer 1) (integer 1) (integer 1)
+ (integer 0) (integer 0))))))
+ (sphere
+ (vector (integer 0) (integer 1) (integer 0) (integer 0) (integer 0))
+ (integer 1)
+ (object-modifiers
+ (texture
+ (pigment (color (integer 1) (integer 1) (integer 1)
(integer 0) (integer 0)))))))' \
| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g')"