1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/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
|