File: templatespp

package info (click to toggle)
libtemplates-parser 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,404 kB
  • sloc: ada: 12,020; python: 658; makefile: 351; sh: 37
file content (25 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (3)
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