From 3802fa500ed902992cfa6abbefb9decefb6891f2 Mon Sep 17 00:00:00 2001 From: Colin Hicks Date: Fri, 15 Feb 2013 12:12:22 -0500 Subject: [PATCH] Add test for unscoped template variable case; compiles a block --- test/expected/local_scope.js | 13 +++++++++++++ test/fixtures/template_local_scope.html | 1 + 2 files changed, 14 insertions(+) create mode 100644 test/expected/local_scope.js create mode 100644 test/fixtures/template_local_scope.html diff --git a/test/expected/local_scope.js b/test/expected/local_scope.js new file mode 100644 index 0000000..ef5d807 --- /dev/null +++ b/test/expected/local_scope.js @@ -0,0 +1,13 @@ +this["JST"] = this["JST"] || {}; + +this["JST"]["test/fixtures/template_local_scope.html"] = function(obj) { +obj || (obj = {}); +var __t, __p = '', __e = _.escape, __d = obj.obj || obj; +with (obj) { +__p += '' + +((__t = ( title )) == null ? '' : __t) + +''; + +} +return __p +}; \ No newline at end of file diff --git a/test/fixtures/template_local_scope.html b/test/fixtures/template_local_scope.html new file mode 100644 index 0000000..d7a184a --- /dev/null +++ b/test/fixtures/template_local_scope.html @@ -0,0 +1 @@ +<%= title %> \ No newline at end of file