#!/bin/sh
set -C -e -f -u
cd "$AUTOPKGTEST_TMP"

cat > mycss.tcss <<EOF
     @@SET@@ COLOR1=blue
     @@SET@@ COLOR2=red
     @@SET@@ LENGTH1=10
     body {background:@_COLOR1_@}
     div  {background:@_COLOR2_@}
     ul.class {background:@_COLOR1_@}  /* same color as body */

     ul   {width:@_ADD(3):LENGTH1_@px} /* ul 3 pixels wider than li */
     li   {width:@_LENGTH1_@px}
EOF
cat > expected <<EOF
     body {background:blue}
     div  {background:red}
     ul.class {background:blue}  /* same color as body */

     ul   {width:13px} /* ul 3 pixels wider than li */
     li   {width:10px}
EOF
templatespp -o mycss.css mycss.tcss
diff -u expected mycss.css
