summaryrefslogtreecommitdiffstats
path: root/tests/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-10-30 01:13:34 -0400
committerTavian Barnes <tavianator@gmail.com>2009-10-30 01:13:34 -0400
commitd615d6795ee81e59795081b7fb2524978b6aa9cb (patch)
tree5ba19b6c55df2332ff71a795f11f590caf59c16d /tests/dimension
parentf5f8d18d86e15e0bd14f955768edb616e1357a66 (diff)
downloaddimension-d615d6795ee81e59795081b7fb2524978b6aa9cb.tar.xz
(Sort of) parse boxes.
Diffstat (limited to 'tests/dimension')
-rw-r--r--tests/dimension/Makefile.am24
-rw-r--r--tests/dimension/box.pov24
-rwxr-xr-xtests/dimension/box.sh22
-rwxr-xr-xtests/dimension/numeric.sh2
4 files changed, 55 insertions, 17 deletions
diff --git a/tests/dimension/Makefile.am b/tests/dimension/Makefile.am
index 8bf7550..36d0989 100644
--- a/tests/dimension/Makefile.am
+++ b/tests/dimension/Makefile.am
@@ -19,27 +19,19 @@
INCLUDES = -I$(top_srcdir)/libdimension
-TESTS = punctuation.sh numeric.sh strings.sh labels.sh directives.sh
+TESTS = punctuation.sh numeric.sh strings.sh labels.sh directives.sh box.sh
TESTS_ENVIRONMENT = top_builddir=$(top_builddir)
-punctuation.sh:
- cp $(srcdir)/punctuation.sh .
-
-numeric.sh:
- cp $(srcdir)/numeric.sh .
-
-strings.sh:
- cp $(srcdir)/strings.sh .
-
-labels.sh:
- cp $(srcdir)/labels.sh .
-
-directives.sh:
- cp $(srcdir)/directives.sh .
+%.sh:
+ cp $(srcdir)/$@ .
EXTRA_DIST = $(TESTS) \
punctuation.pov \
numeric.pov \
strings.pov \
labels.pov \
- directives.pov
+ directives.pov \
+ box.pov
+
+clean-local:
+ rm *.png
diff --git a/tests/dimension/box.pov b/tests/dimension/box.pov
new file mode 100644
index 0000000..47b1cde
--- /dev/null
+++ b/tests/dimension/box.pov
@@ -0,0 +1,24 @@
+/*************************************************************************
+ * Copyright (C) 2009 Tavian Barnes <tavianator@gmail.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/>. *
+ *************************************************************************/
+
+// Render a box
+
+box {
+ <-1, -1, -1>, <1, 1, 1>
+}
diff --git a/tests/dimension/box.sh b/tests/dimension/box.sh
new file mode 100755
index 0000000..244b6fa
--- /dev/null
+++ b/tests/dimension/box.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+#########################################################################
+# Copyright (C) 2009 Tavian Barnes <tavianator@gmail.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/>. #
+#########################################################################
+
+${top_builddir}/dimension/dimension -o box.png ${srcdir}/box.pov
diff --git a/tests/dimension/numeric.sh b/tests/dimension/numeric.sh
index b64c218..d4b4d89 100755
--- a/tests/dimension/numeric.sh
+++ b/tests/dimension/numeric.sh
@@ -20,7 +20,7 @@
#########################################################################
numeric=$(${top_builddir}/dimension/dimension --tokenize ${srcdir}/numeric.pov)
-numeric_exp='((int "1") (int "123456789") (int "01234567") (int "0x123456789") - (int "0x01") (float ".1") (float "0.1") (float "1.0") (float "0.123456789") - (float "0.123456789") < (int "1") , (float "2.2") , - (float "3.03") >)'
+numeric_exp='((integer "1") (integer "123456789") (integer "01234567") (integer "0x123456789") - (integer "0x01") (float ".1") (float "0.1") (float "1.0") (float "0.123456789") - (float "0.123456789") < (integer "1") , (float "2.2") , - (float "3.03") >)'
if [ "$numeric" != "$numeric_exp" ]; then
echo "numeric.pov tokenized as \"$numeric\"" >&2