Commit Graph

37 Commits

Author SHA1 Message Date
Tyler Akins
511a3187e8
Changing how parsed/unparsed content is tracked
Use global variables instead of passing to every function.

112 specs pass, 7 overridden, 62 fail, 7 skipped.
2023-04-10 21:07:45 -05:00
Tyler Akins
d32b912472
Moving delimiters and standalone to global vars 2023-04-10 13:24:06 -05:00
Tyler Akins
3a58ee390e
More bugfixes and shellcheck tweaks 2023-04-10 11:39:47 -05:00
Tyler Akins
7604ce3054
Pass shellcheck, more specs are handled, preserve function whitespace
This closes #49.
2023-04-10 08:10:14 -05:00
Tyler Akins
e0e9189355
Bugfixes, pretty printing, new tests added
Spec result: 108 specs pass, 6 skipped, 67 fail
2023-04-09 18:53:55 -05:00
Tyler Akins
a1e4398547
Overriding some tests so they work with mo + bugfix 2023-04-09 10:20:45 -05:00
Tyler Akins
47e10012ee
Splitting parse function, fixing variable bug 2023-04-09 09:52:18 -05:00
Tyler Akins
a237d23a2d
Fix standalone tag detection 2023-04-08 19:06:04 -05:00
Tyler Akins
d997ad0e0a
Passes all of the tests 2023-04-07 23:10:47 -05:00
Tyler Akins
febd3467c8
Attempting to address shortcomings and whitespace issues 2023-04-07 19:35:25 -05:00
Tyler Akins
8e9fd680d4
Fixing a test, release 2.4.1 2023-04-05 21:14:19 -05:00
Tyler Akins
4311f29879
Fixing the build, some doc cleanup, update version 2023-04-05 20:54:27 -05:00
Joseph Dalrymple
c28bffe708 Added @key loop accessor 2023-04-05 20:19:29 -05:00
Tyler Akins
4c332c9188 Updating test and documentation 2020-10-01 07:42:57 -05:00
Tyler Akins
1d2617dde1 Confirming multiple --source arguments work 2020-10-01 07:37:48 -05:00
Tyler Akins
dcd9d7738b Adding tests, shellcheck cleanup, update docs, release 2.2.0 2020-08-05 15:44:04 -05:00
Andrea Bonomi
5b8cf24068 Pass arguments to function as environment variable MO_ALLOW_FUNCTION_ARGUMENTS 2019-08-08 11:43:50 +02:00
Andrea Bonomi
fcedd32155 Pass arguments to function as environment variable MO_ARGS 2019-08-07 15:01:51 +02:00
Tyler Akins
ad98577c42
Changing how functions are called
Old way:

    functionName CONTENT argument1 argument2

New way:

    echo -n "$CONTENT" | functionName argument1 argument2

This follow the Unix style more closely.
2017-11-13 10:13:56 -06:00
Tyler Akins
e78b15d95b
Updating test to enable the flag 2017-11-03 19:38:34 -05:00
Tyler Akins
a5ec7dd740
I think this finally implements arguments to functions
This closes #18.
2017-11-03 16:34:08 -05:00
Tyler Akins
0627cbbaf8
Making tests care about whitespace
When testing #19 I found that the tests were mistakenly ignoring some
whitespace changes. I've enabled whitespace checks and had to update the
tests because my editor likes newlines at the end of files and removes
whitespace at the end of lines. To make the test files easier to manage,
I've modified some scenarios to still test for the feature but also work
with the whitespace modifications that editors would perform.
2017-08-02 10:35:35 -05:00
Tyler Akins
f14150c205
Fixing indentation of partials in a condition
This is to address #19.
2017-08-02 10:34:58 -05:00
Alexey Maslennikov
078dcabb06 Fix exit code when partial file not found 2017-06-23 21:10:38 +02:00
Tyler Akins
6376a9b817
Fixing indentation of multiple partials
This fixes #16.
2017-06-20 14:19:44 -05:00
Alexey Maslennikov
31b2faf135 Fixing empty variable failure for --fail-not-set 2017-06-16 15:59:57 +02:00
Alexey Maslennikov
2b611b8f90 Making --fail-not-set work with partials
The return code was not propagated through nested subshells in case
when files were passed in as arguments.
2017-06-16 10:50:18 +02:00
Alexey Maslennikov
50aa18e2a6 Adding an option to fail upon unset env variables 2017-06-16 10:47:31 +02:00
Tyler Akins
0ca9970b58
Fixing multi-line partials 2017-04-21 09:37:16 -05:00
Tyler Akins
1c03949107 Enabling a "false is empty" style check.
This is based off of pull request #10 from @athieriot.
Thanks for the idea!  I've implemented it as a flag and an environment
variable that can be enabled.  I've also added another test to handle
the environment variable.
2016-07-27 09:56:33 -05:00
Tyler Akins
ea76dc468b Handling double-hyphens 2016-07-21 09:47:37 -05:00
Tyler Akins
b69406835f Split test into three 2016-07-21 09:34:36 -05:00
Alexandre-Silva
45475ec77e Add test for --source flag and pull request suggestions
Add a demo/sourcing.vars file to be used by the associated demo
script.

Modified mo argument parsing so that --help and --source=file do not need
to be the first arguments for mo. And can in fact appear after or in the
middle of filenames.
2016-07-21 15:16:46 +01:00
Tyler Akins
600f5c5725 Adding mechanism to test command-line variables 2016-07-21 07:06:39 -05:00
Tyler Akins
e623b16bb8 Allowing access to globals while in a loop
This used to make a name like DATA.0.STR.  Since bash doesn't like using
multi-dimensional arrays, we can shortcut things and just assume that
STR referes to the global variable here.

This closes issue #7
2015-08-27 09:43:10 -05:00
Tyler Akins
5aa22680f5 Adding better block detection
Pulled the block finding code into its own function to eliminate a
recursion problem.

Test failure count dropped because lambdas are supported and I just
needed to update the spec.  Pull request mustache/spec#86 aims to add
bash support.  Until then, the testing script will fall back to using
perl.

34 failing tests
2015-01-26 12:51:28 -06:00
Tyler Akins
1151ec0a9e Initial commit 2015-01-23 17:43:08 +00:00