From 7bbc14551b0513ec94bdac0eff0d64842fe55b2b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 25 Nov 2009 02:04:15 -0500 Subject: Format S-expressions a bit nicer in test scripts. --- tests/dimension/arithexp.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'tests/dimension/arithexp.sh') diff --git a/tests/dimension/arithexp.sh b/tests/dimension/arithexp.sh index dc63576..24aebd8 100755 --- a/tests/dimension/arithexp.sh +++ b/tests/dimension/arithexp.sh @@ -20,8 +20,22 @@ ######################################################################### arithexp=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/arithexp.pov) -arithexp_exp='(sphere { < < (float "2.0") - (float "1.0") , (float "3.0") , (float "4.0") > . x , \( (float "1.0") + (integer "2") \) * (integer "2") - (integer "5") , (float "1.0") + (integer "2") * (integer "2") - (integer "4") > - - < (integer "0") , (integer "0") , (integer "1") > , (float "2.25") - (integer "1") * (integer "2") }) -((sphere (vector (float 0) (float 0) (float 0) (integer 0) (integer 0)) (float 0.25) object-modifiers))' +arithexp_exp="$(echo -n \ +'(sphere { + < < (float "2.0") - (float "1.0") , (float "3.0") , (float "4.0") > . x , + \( (float "1.0") + (integer "2") \) * (integer "2") - (integer "5") , + (float "1.0") + (integer "2") * (integer "2") - (integer "4") > + - + - < (integer "0") , (integer "0") , (integer "1") > , + (float "2.25") - (integer "1") * (integer "2") + })' \ +| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g') +$(echo -n \ +'((sphere + (vector (float 0) (float 0) (float 0) (integer 0) (integer 0)) + (float 0.25) + object-modifiers))' \ +| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g')" if [ "$arithexp" != "$arithexp_exp" ]; then echo "arithexp.pov parsed as \"$arithexp\"" >&2 -- cgit v1.2.3