Debian Codegraph @

debian/tests/templatespp

raw
1 #!/bin/sh
2 set -C -e -f -u
3 cd "$AUTOPKGTEST_TMP"
4
5 cat > mycss.tcss <<EOF
6 @@SET@@ COLOR1=blue
7 @@SET@@ COLOR2=red
8 @@SET@@ LENGTH1=10
9 body {background:@_COLOR1_@}
10 div {background:@_COLOR2_@}
11 ul.class {background:@_COLOR1_@} /* same color as body */
12
13 ul {width:@_ADD(3):LENGTH1_@px} /* ul 3 pixels wider than li */
14 li {width:@_LENGTH1_@px}
15 EOF
16 cat > expected <<EOF
17 body {background:blue}
18 div {background:red}
19 ul.class {background:blue} /* same color as body */
20
21 ul {width:13px} /* ul 3 pixels wider than li */
22 li {width:10px}
23 EOF
24 templatespp -o mycss.css mycss.tcss
25 diff -u expected mycss.css