summaryrefslogtreecommitdiffstats
path: root/spec/regressions.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/regressions.js')
-rw-r--r--spec/regressions.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/regressions.js b/spec/regressions.js
index a1eec2f..4dc2ac8 100644
--- a/spec/regressions.js
+++ b/spec/regressions.js
@@ -268,4 +268,24 @@ describe('Regressions', function() {
' 1. IF: John--\n'
+ ' 2. MYIF: John==\n');
});
+
+ it('GH-1186: Support block params for existing programs', function() {
+ var string =
+ '{{#*inline "test"}}{{> @partial-block }}{{/inline}}'
+ + '{{#>test }}{{#each listOne as |item|}}{{ item }}{{/each}}{{/test}}'
+ + '{{#>test }}{{#each listTwo as |item|}}{{ item }}{{/each}}{{/test}}';
+
+ shouldCompileTo(string, { listOne: ['a'], listTwo: ['b']}, 'ab', '');
+ });
+
+ it('should allow hash with protected array names', function() {
+ var obj = {array: [1], name: 'John'};
+ var helpers = {
+ helpa: function(options) {
+ return options.hash.length;
+ }
+ };
+
+ shouldCompileTo('{{helpa length="foo"}}', [obj, helpers], 'foo');
+ });
});