mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Initial commit
This commit is contained in:
1
tests/array.env
Normal file
1
tests/array.env
Normal file
@@ -0,0 +1 @@
|
||||
repo=( "resque" "hub" "rip" )
|
||||
6
tests/array.expected
Normal file
6
tests/array.expected
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
<b>resque</b>
|
||||
|
||||
<b>hub</b>
|
||||
|
||||
<b>rip</b>
|
||||
3
tests/array.template
Normal file
3
tests/array.template
Normal file
@@ -0,0 +1,3 @@
|
||||
{{#repo}}
|
||||
<b>{{.}}</b>
|
||||
{{/repo}}
|
||||
0
tests/comment-newline.env
Normal file
0
tests/comment-newline.env
Normal file
1
tests/comment-newline.expected
Normal file
1
tests/comment-newline.expected
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Today.</h1>
|
||||
4
tests/comment-newline.template
Normal file
4
tests/comment-newline.template
Normal file
@@ -0,0 +1,4 @@
|
||||
<h1>Today{{! ignore me
|
||||
and this can
|
||||
run through multiple
|
||||
lines}}.</h1>
|
||||
0
tests/comment.env
Normal file
0
tests/comment.env
Normal file
1
tests/comment.expected
Normal file
1
tests/comment.expected
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Today.</h1>
|
||||
1
tests/comment.template
Normal file
1
tests/comment.template
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Today{{! ignore me }}.</h1>
|
||||
1
tests/false-list.env
Normal file
1
tests/false-list.env
Normal file
@@ -0,0 +1 @@
|
||||
person=""
|
||||
1
tests/false-list.expected
Normal file
1
tests/false-list.expected
Normal file
@@ -0,0 +1 @@
|
||||
Shown.
|
||||
4
tests/false-list.template
Normal file
4
tests/false-list.template
Normal file
@@ -0,0 +1,4 @@
|
||||
Shown.
|
||||
{{#person}}
|
||||
Never shown!
|
||||
{{/person}}
|
||||
4
tests/function.env
Normal file
4
tests/function.env
Normal file
@@ -0,0 +1,4 @@
|
||||
name=Willy
|
||||
wrapped() {
|
||||
echo "<b>$1</b>";
|
||||
}
|
||||
2
tests/function.expected
Normal file
2
tests/function.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
<b>
|
||||
Willy is awesome.</b>
|
||||
3
tests/function.template
Normal file
3
tests/function.template
Normal file
@@ -0,0 +1,3 @@
|
||||
{{#wrapped}}
|
||||
{{name}} is awesome.
|
||||
{{/wrapped}}
|
||||
1
tests/inverted.env
Normal file
1
tests/inverted.env
Normal file
@@ -0,0 +1 @@
|
||||
repo=()
|
||||
3
tests/inverted.expected
Normal file
3
tests/inverted.expected
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
No repos :(
|
||||
6
tests/inverted.template
Normal file
6
tests/inverted.template
Normal file
@@ -0,0 +1,6 @@
|
||||
{{#repo}}
|
||||
<b>{{.}}</b>
|
||||
{{/repo}}
|
||||
{{^repo}}
|
||||
No repos :(
|
||||
{{/repo}}
|
||||
2
tests/miss.env
Normal file
2
tests/miss.env
Normal file
@@ -0,0 +1,2 @@
|
||||
name="Chris"
|
||||
company="<b>GitHub</b>"
|
||||
4
tests/miss.expected
Normal file
4
tests/miss.expected
Normal file
@@ -0,0 +1,4 @@
|
||||
* Chris
|
||||
*
|
||||
* <b>GitHub</b>
|
||||
* <b>GitHub</b>
|
||||
4
tests/miss.template
Normal file
4
tests/miss.template
Normal file
@@ -0,0 +1,4 @@
|
||||
* {{name}}
|
||||
* {{age}}
|
||||
* {{company}}
|
||||
* {{{company}}}
|
||||
6
tests/mush.env
Normal file
6
tests/mush.env
Normal file
@@ -0,0 +1,6 @@
|
||||
USER=jwerle
|
||||
GENDER=male
|
||||
THING=apple
|
||||
COLOR=red
|
||||
PERSON=tobi
|
||||
ADJECTIVE=cool
|
||||
7
tests/mush.expected
Normal file
7
tests/mush.expected
Normal 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
7
tests/mush.template
Normal 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
1
tests/non-false.env
Normal file
@@ -0,0 +1 @@
|
||||
person=Jon
|
||||
2
tests/non-false.expected
Normal file
2
tests/non-false.expected
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
Hi Jon!
|
||||
3
tests/non-false.template
Normal file
3
tests/non-false.template
Normal file
@@ -0,0 +1,3 @@
|
||||
{{#person}}
|
||||
Hi {{.}}!
|
||||
{{/person}}
|
||||
1
tests/partial.env
Normal file
1
tests/partial.env
Normal file
@@ -0,0 +1 @@
|
||||
names=( "Tyler" )
|
||||
3
tests/partial.expected
Normal file
3
tests/partial.expected
Normal file
@@ -0,0 +1,3 @@
|
||||
<h2>Names</h2>
|
||||
|
||||
<strong>Tyler</strong>
|
||||
1
tests/partial.partial
Normal file
1
tests/partial.partial
Normal file
@@ -0,0 +1 @@
|
||||
<strong>{{.}}</strong>
|
||||
4
tests/partial.template
Normal file
4
tests/partial.template
Normal file
@@ -0,0 +1,4 @@
|
||||
<h2>Names</h2>
|
||||
{{#names}}
|
||||
{{> partial.partial}}
|
||||
{{/names}}
|
||||
4
tests/typical.env
Normal file
4
tests/typical.env
Normal file
@@ -0,0 +1,4 @@
|
||||
NAME="Chris"
|
||||
VALUE=10000
|
||||
TAXED_VALUE=6000
|
||||
IN_CA=true
|
||||
4
tests/typical.expected
Normal file
4
tests/typical.expected
Normal file
@@ -0,0 +1,4 @@
|
||||
Hello Chris
|
||||
You have just won 10000 dollars!
|
||||
|
||||
Well, 6000 dollars, after taxes.
|
||||
5
tests/typical.template
Normal file
5
tests/typical.template
Normal file
@@ -0,0 +1,5 @@
|
||||
Hello {{NAME}}
|
||||
You have just won {{VALUE}} dollars!
|
||||
{{#IN_CA}}
|
||||
Well, {{TAXED_VALUE}} dollars, after taxes.
|
||||
{{/IN_CA}
|
||||
Reference in New Issue
Block a user