mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-20 07:44:33 +01:00
@@ -1 +1 @@
|
||||
cat: --help: No such file or directory
|
||||
File does not exist: /home/fidian/repo/mo/tests/--help
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
# This should display a message indicating that the file --help
|
||||
# could not be found. It should not display a help messsage.
|
||||
cd "${0%/*}"
|
||||
../mo -- --help 2>&1
|
||||
../mo -u -- --help 2>&1
|
||||
|
||||
@@ -9,9 +9,19 @@ Learn more about mustache templates at https://mustache.github.io/
|
||||
|
||||
Simple usage:
|
||||
|
||||
mo [--false] [--help] [--source=FILE] filenames...
|
||||
mo [OPTIONS] filenames...
|
||||
|
||||
--fail-not-set - Fail upon expansion of an unset variable.
|
||||
--false - Treat the string "false" as empty for conditionals.
|
||||
--help - This message.
|
||||
--source=FILE - Load FILE into the environment before processing templates.
|
||||
Options:
|
||||
|
||||
-u, --fail-not-set
|
||||
- Fail upon expansion of an unset variable.
|
||||
-e, --false
|
||||
- Treat the string "false" as empty for conditionals.
|
||||
-h, --help
|
||||
- This message.
|
||||
-s=FILE, --source=FILE
|
||||
- Load FILE into the environment before processing templates.
|
||||
-p=PATH, --path=PATH
|
||||
- Set a colon-delimited list of folders to search for templates.
|
||||
|
||||
MO_VERSION=2.0.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "${0%/*}"
|
||||
../mo --help
|
||||
../mo -u --help
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
cat: --something: No such file or directory
|
||||
|
||||
@@ -1 +1 @@
|
||||
cat: partial-missing.partial: No such file or directory
|
||||
File does not exist: /home/fidian/repo/mo/tests/partial-missing.partial
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "${0%/*}"
|
||||
../mo partial-missing.template 2>&1
|
||||
../mo -u partial-missing.template 2>&1
|
||||
returned=$?
|
||||
|
||||
if [[ $? -ne 1 ]]; then
|
||||
echo "Did not return 1"
|
||||
if [[ $returned -ne 1 ]]; then
|
||||
echo "Did not return 1. Instead, returned $returned."
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "${0%/*}"
|
||||
cat <<EOF | ../mo --source=source.vars
|
||||
. ../mo
|
||||
cat <<EOF | mo --source=source.vars
|
||||
{{VAR}}
|
||||
{{#ARR}}
|
||||
* {{.}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export VAR=value
|
||||
export ARR=(1 2 3)
|
||||
declare -A ASSOC_ARR
|
||||
export ASSOC_ARR=([a]=AAA [b]=BBB)
|
||||
ASSOC_ARR=([a]=AAA [b]=BBB)
|
||||
|
||||
Reference in New Issue
Block a user