2023-04-08 00:35:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
cd "${0%/*}" || exit 1
|
|
|
|
. ../run-tests
|
|
|
|
|
2023-04-10 13:10:14 +00:00
|
|
|
export multilineData=$'line 1\nline 2'
|
2023-04-08 00:35:25 +00:00
|
|
|
template() {
|
|
|
|
cat <<EOF
|
|
|
|
Partial:
|
|
|
|
|
|
|
|
{{> fixtures/multi-line-partial.partial}}
|
|
|
|
|
|
|
|
Indented:
|
|
|
|
|
|
|
|
{{> fixtures/multi-line-partial.partial}}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
expected() {
|
|
|
|
cat <<EOF
|
|
|
|
Partial:
|
|
|
|
|
|
|
|
line 1
|
|
|
|
line 2
|
|
|
|
|
|
|
|
Indented:
|
|
|
|
|
|
|
|
line 1
|
2023-04-09 23:53:55 +00:00
|
|
|
line 2
|
2023-04-08 00:35:25 +00:00
|
|
|
EOF
|
2023-04-10 13:10:14 +00:00
|
|
|
# This one looks odd, but if you check the spec spec/specs/partials.yaml,
|
|
|
|
# name "Standalone Indentation" (mirrors "standalone-indentation" in
|
|
|
|
# tests/), then the spec clearly shows that the indentation is applied
|
|
|
|
# before rendering.
|
2023-04-08 00:35:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
runTest
|