spec/unit/compiler/test_parser.rb in wlang-2.0.1 vs spec/unit/compiler/test_parser.rb in wlang-2.1.0

- old
+ new

@@ -41,9 +41,26 @@ [:fn, [:static, "first" ]], [:fn, [:static, "second"]]]]] parse("${first}{second}").should eq(expected) end + it 'should support wlang tags inside normal { ... }' do + expected = \ + [:template, + [:fn, + [:strconcat, + [:static, "hello "], + [:strconcat, + [:static, "{"], + [:strconcat, + [:static, "bar "], + [:wlang, "$", + [:fn, + [:static, "second"]]]], + [:static, "}"]]]]] + parse("hello {bar ${second}}").should eq(expected) + end + it 'is idempotent' do parse(parse(hello_tpl)).should eq(expected) end it 'supports a path-like object' do \ No newline at end of file