From c0a0ee5ae71b97b1400efddb4c374e1d13701fa3 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 26 Nov 2009 13:51:20 -0500 Subject: Implement background colors. --- tests/dimension/demo.pov | 10 +++++++--- tests/dimension/demo.sh | 31 ++++++------------------------- 2 files changed, 13 insertions(+), 28 deletions(-) (limited to 'tests') diff --git a/tests/dimension/demo.pov b/tests/dimension/demo.pov index b6833bc..c6f99fb 100644 --- a/tests/dimension/demo.pov +++ b/tests/dimension/demo.pov @@ -19,21 +19,25 @@ // Render demo scene +background { + color rgbf <0, 0, 0.1, 0.1> +} + light_source { - <-15, 20, 10>, rgb <1, 1, 1> + <-15, 20, 10>, color rgb <1, 1, 1> } box { <-1, -1, -1>, <1, 1, 1> rotate <45, 0, 0> pigment { - rgbft <0, 0, 1, 0.25, 0.25> + color rgbft <0, 0, 1, 0.25, 0.25> } } sphere { <0, 0, 0>, 1.25 pigment { - rgb <0, 1, 0> + color rgb <0, 1, 0> } } diff --git a/tests/dimension/demo.sh b/tests/dimension/demo.sh index fbd6fc3..0d8da5a 100755 --- a/tests/dimension/demo.sh +++ b/tests/dimension/demo.sh @@ -19,30 +19,11 @@ # along with this program. If not, see . # ######################################################################### -demo=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/demo.pov) -demo_exp="$(echo -n \ -'(light_source { - < - (integer "15") , (integer "20") , (integer "10") > , - rgb < (integer "1") , (integer "1") , (integer "1") > - } - box { - < - (integer "1") , - (integer "1") , - (integer "1") > , - < (integer "1") , (integer "1") , (integer "1") > - rotate < (integer "45") , (integer "0") , (integer "0") > - pigment { - rgbft < (integer "0") , (integer "0") , (integer "1") , - (float "0.25") , (float "0.25") > - } - } - sphere { - < (integer "0") , (integer "0") , (integer "0") > , (float "1.25") - pigment { - rgb < (integer "0") , (integer "1") , (integer "0") > - } - })' \ -| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g') -$(echo -n \ -'((light_source +demo=$(${top_builddir}/dimension/dimension --parse ${srcdir}/demo.pov) +demo_exp=$(echo -n \ +'((background + (vector (integer 0) (integer 0) (float 0.1) (float 0.1) (integer 0))) + (light_source (vector (integer -15) (integer 20) (integer 10) (integer 0) (integer 0)) (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0))) (box @@ -61,7 +42,7 @@ $(echo -n \ (texture (pigment (vector (integer 0) (integer 1) (integer 0) (integer 0) (integer 0)))))))' \ -| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g')" +| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g') if [ "$demo" != "$demo_exp" ]; then echo "demo.pov parsed as \"$demo\"" >&2 -- cgit v1.2.3