Initial commit

This commit is contained in:
Tyler Akins
2015-01-23 17:43:08 +00:00
commit 1151ec0a9e
40 changed files with 575 additions and 0 deletions

1
tests/array.env Normal file
View File

@@ -0,0 +1 @@
repo=( "resque" "hub" "rip" )

6
tests/array.expected Normal file
View File

@@ -0,0 +1,6 @@
<b>resque</b>
<b>hub</b>
<b>rip</b>

3
tests/array.template Normal file
View File

@@ -0,0 +1,3 @@
{{#repo}}
<b>{{.}}</b>
{{/repo}}

View File

View File

@@ -0,0 +1 @@
<h1>Today.</h1>

View File

@@ -0,0 +1,4 @@
<h1>Today{{! ignore me
and this can
run through multiple
lines}}.</h1>

0
tests/comment.env Normal file
View File

1
tests/comment.expected Normal file
View File

@@ -0,0 +1 @@
<h1>Today.</h1>

1
tests/comment.template Normal file
View File

@@ -0,0 +1 @@
<h1>Today{{! ignore me }}.</h1>

1
tests/false-list.env Normal file
View File

@@ -0,0 +1 @@
person=""

View File

@@ -0,0 +1 @@
Shown.

View File

@@ -0,0 +1,4 @@
Shown.
{{#person}}
Never shown!
{{/person}}

4
tests/function.env Normal file
View File

@@ -0,0 +1,4 @@
name=Willy
wrapped() {
echo "<b>$1</b>";
}

2
tests/function.expected Normal file
View File

@@ -0,0 +1,2 @@
<b>
Willy is awesome.</b>

3
tests/function.template Normal file
View File

@@ -0,0 +1,3 @@
{{#wrapped}}
{{name}} is awesome.
{{/wrapped}}

1
tests/inverted.env Normal file
View File

@@ -0,0 +1 @@
repo=()

3
tests/inverted.expected Normal file
View File

@@ -0,0 +1,3 @@
No repos :(

6
tests/inverted.template Normal file
View File

@@ -0,0 +1,6 @@
{{#repo}}
<b>{{.}}</b>
{{/repo}}
{{^repo}}
No repos :(
{{/repo}}

2
tests/miss.env Normal file
View File

@@ -0,0 +1,2 @@
name="Chris"
company="<b>GitHub</b>"

4
tests/miss.expected Normal file
View File

@@ -0,0 +1,4 @@
* Chris
*
* <b>GitHub</b>
* <b>GitHub</b>

4
tests/miss.template Normal file
View File

@@ -0,0 +1,4 @@
* {{name}}
* {{age}}
* {{company}}
* {{{company}}}

6
tests/mush.env Normal file
View File

@@ -0,0 +1,6 @@
USER=jwerle
GENDER=male
THING=apple
COLOR=red
PERSON=tobi
ADJECTIVE=cool

7
tests/mush.expected Normal file
View File

@@ -0,0 +1,7 @@
jwerle is male
apple is red
tobi is cool
jwerle is friends with tobi

7
tests/mush.template Normal file
View File

@@ -0,0 +1,7 @@
{{! this is a comment }}
{{USER}} is {{GENDER}}
{{THING}} is {{COLOR}}
{{PERSON}} is {{ADJECTIVE}}
{{USER}} is friends with {{PERSON}}
{{var}} {{value}}

1
tests/non-false.env Normal file
View File

@@ -0,0 +1 @@
person=Jon

2
tests/non-false.expected Normal file
View File

@@ -0,0 +1,2 @@
Hi Jon!

3
tests/non-false.template Normal file
View File

@@ -0,0 +1,3 @@
{{#person}}
Hi {{.}}!
{{/person}}

1
tests/partial.env Normal file
View File

@@ -0,0 +1 @@
names=( "Tyler" )

3
tests/partial.expected Normal file
View File

@@ -0,0 +1,3 @@
<h2>Names</h2>
<strong>Tyler</strong>

1
tests/partial.partial Normal file
View File

@@ -0,0 +1 @@
<strong>{{.}}</strong>

4
tests/partial.template Normal file
View File

@@ -0,0 +1,4 @@
<h2>Names</h2>
{{#names}}
{{> partial.partial}}
{{/names}}

4
tests/typical.env Normal file
View File

@@ -0,0 +1,4 @@
NAME="Chris"
VALUE=10000
TAXED_VALUE=6000
IN_CA=true

4
tests/typical.expected Normal file
View File

@@ -0,0 +1,4 @@
Hello Chris
You have just won 10000 dollars!
Well, 6000 dollars, after taxes.

5
tests/typical.template Normal file
View File

@@ -0,0 +1,5 @@
Hello {{NAME}}
You have just won {{VALUE}} dollars!
{{#IN_CA}}
Well, {{TAXED_VALUE}} dollars, after taxes.
{{/IN_CA}