From 1d4bc2779ac106db1b46b7c610a9ccade02f1e45 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 2 Apr 2015 11:03:17 -0700 Subject: [PATCH] Some additional tests for unbalanced sub-expressions --- packages/spacebars-compiler/spacebars_tests.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/spacebars-compiler/spacebars_tests.js b/packages/spacebars-compiler/spacebars_tests.js index 19a90a4df0a..020eff8d368 100644 --- a/packages/spacebars-compiler/spacebars_tests.js +++ b/packages/spacebars-compiler/spacebars_tests.js @@ -73,6 +73,7 @@ Tinytest.add("spacebars-compiler - stache tags", function (test) { ['PATH', ['qux'], 'baz'], ['PATH', ['.'], 'x3']]}); + // nested expressions run('{{helper (subhelper ./arg) arg.sub (args.passedHelper)}}', { type: 'DOUBLE', path: ['helper'], args: [ @@ -92,6 +93,10 @@ Tinytest.add("spacebars-compiler - stache tags", function (test) { ] ] }); + run('{{helper (h arg}}', "Expected `)`"); + run('{{helper (h arg))}}', "Expected"); + run('{{helper ) h arg}}', "Expected"); + run('{{(dyn) arg}}', "Expected ID"); run('{{{x 0.3 [0].[3] .4 ./[4]}}}', {type: 'TRIPLE', path: ['x'],