Skip to content

Commit

Permalink
Some additional tests for unbalanced sub-expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Apr 2, 2015
1 parent 302f8c0 commit 1d4bc27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/spacebars-compiler/spacebars_tests.js
Expand Up @@ -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: [
Expand All @@ -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'],
Expand Down

0 comments on commit 1d4bc27

Please sign in to comment.