mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Attempting to address shortcomings and whitespace issues
This commit is contained in:
24
tests/function
Executable file
24
tests/function
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
cd "${0%/*}" || exit 1
|
||||
. ../run-tests
|
||||
|
||||
name=Willy
|
||||
wrapped() {
|
||||
# This eats the newline in the content
|
||||
echo "<b>$(cat)</b>"
|
||||
}
|
||||
template() {
|
||||
cat <<EOF
|
||||
{{#wrapped}}
|
||||
{{name}} is awesome.
|
||||
{{/wrapped}}
|
||||
... this is the last line.
|
||||
EOF
|
||||
}
|
||||
expected() {
|
||||
cat <<EOF
|
||||
<b> Willy is awesome.</b>... this is the last line.
|
||||
EOF
|
||||
}
|
||||
|
||||
runTest
|
||||
Reference in New Issue
Block a user