diff options
Diffstat (limited to 'tests/dimension/directives.sh')
-rwxr-xr-x | tests/dimension/directives.sh | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh deleted file mode 100755 index 9e3974a..0000000 --- a/tests/dimension/directives.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/sh - -######################################################################### -# Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> # -# # -# This file is part of The Dimension Test Suite. # -# # -# The Dimension Test Suite is free software; you can redistribute it # -# and/or modify it under the terms of the GNU General Public License as # -# published by the Free Software Foundation; either version 3 of the # -# License, or (at your option) any later version. # -# # -# The Dimension Test Suite is distributed in the hope that it will be # -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty # -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # -# General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see <http://www.gnu.org/licenses/>. # -######################################################################### - -directives=$(${top_builddir}/dimension/dimension ${dimension_flags} --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") \) - #error (string "Local escaped from include file") - #end - #ifdef \( (identifier "Unused") \) - #error (string "#undef failed") - #end - #macro (identifier "Make_Sphere") \( (identifier "n") \) - sphere { - (identifier "Center") + < (integer "0") , (identifier "n") , (integer "0") > , (identifier "R") - pigment { - color (identifier "Color") green (integer "1") - } - } - #end - #macro (identifier "Inc") \( (identifier "n") \) - #declare (identifier "n") = (identifier "n") + (integer "1") ; - #end - #declare (identifier "Counter") = (integer "0") ; - #while \( (identifier "Counter") < (integer "2") \) - #if \( #if \( (integer "1") = (integer "1") \) (integer "0") #end = (integer "0") & ! (integer "1") \) - #error (string "Nested #if parsing failed") - #else - (identifier "Make_Sphere") \( (identifier "Counter") \) - #end - (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") > , - < (integer "1") , (integer "1") , (integer "1") > - pigment { - color rgb < (integer "1") , (integer "1") , (integer "1") > - } - } - - object { - (identifier "Box") - finish { - phong (float "0.2") - } - })' \ -| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g') -$(echo -n \ -'((object - (sphere - (vector (integer 0) (integer 0) (integer 0) (integer 0) (integer 0)) - (integer 1)) - (object-modifiers - (pigment - (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0)) - pigment-modifiers))) - (object - (sphere - (vector (integer 0) (integer 1) (integer 0) (integer 0) (integer 0)) - (integer 1)) - (object-modifiers - (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)) - (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0))) - (object-modifiers - (pigment - (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0)) - pigment-modifiers) - (finish - (phong (float 0.2))))))' \ -| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g')" - -if [ "$directives" != "$directives_exp" ]; then - echo "directives.pov parsed as \"$directives\"" >&2 - echo " -- expected \"$directives_exp\"" >&2 - exit 1 -fi |