diff options
author | Pieter van de Bruggen <pvande@gmail.com> | 2010-12-17 00:45:17 -0800 |
---|---|---|
committer | Pieter van de Bruggen <pvande@gmail.com> | 2010-12-17 00:45:17 -0800 |
commit | 5f0ae9a12bc587d0a1ff5ec1f7c7a5aeaccda0ff (patch) | |
tree | b2743fa208d153cb64e60bae23f624929c1d0c63 | |
parent | 37aa4b4b69017173e741fcf825f4ca48ba22b805 (diff) | |
download | mustache-spec-5f0ae9a12bc587d0a1ff5ec1f7c7a5aeaccda0ff.tar.gz |
Specifying behavior for sectional lambdas.
-rw-r--r-- | specs/~lambdas.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/specs/~lambdas.yml b/specs/~lambdas.yml index acea516..3b3f3e4 100644 --- a/specs/~lambdas.yml +++ b/specs/~lambdas.yml @@ -75,6 +75,16 @@ tests: template: "<{{#lambda}}-{{/lambda}}>" expected: "<-Earth->" + - name: Section - Multiple Calls + desc: Lambdas used for sections should not simply cache the first response. + data: + lambda: !code + ruby: 'proc { |text| "__#{text}__" }' + perl: 'sub { "__" . $_[0] . "__" }' + js: 'function(txt) { return "__" + txt + "__" }' + template: '{{#lambda}}FILE{{/lambda}} != {{#lambda}}LINE{{/ambda}}' + expected: '__FILE__ != __LINE__' + - name: Inverted Section desc: Lambdas used for inverted sections should be considered truthy. data: |