summaryrefslogtreecommitdiffstats
path: root/dimension/tests/directives.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-15 16:10:51 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-15 16:10:51 -0600
commite5e88afdbf158e6df8f8c3328f308512819d9cf3 (patch)
tree2a011762c07c0087defcdc1f1022ffe32d532f49 /dimension/tests/directives.sh
parenta5a6b94c038e01ebf1e2de0a0774a69b02fb8e1e (diff)
downloaddimension-e5e88afdbf158e6df8f8c3328f308512819d9cf3.tar.xz
Rip out old client.
Diffstat (limited to 'dimension/tests/directives.sh')
-rwxr-xr-xdimension/tests/directives.sh124
1 files changed, 0 insertions, 124 deletions
diff --git a/dimension/tests/directives.sh b/dimension/tests/directives.sh
deleted file mode 100755
index 9e3974a..0000000
--- a/dimension/tests/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