Commit Graph

208 Commits

Author SHA1 Message Date
kpdecker 0cf5657c43 Use shouldThrow helper for test asserts 2013-12-23 02:19:09 -06:00
kpdecker 1041c1d533 Add tests for object @index and @first handling 2013-12-22 18:46:13 -06:00
kpdecker 96a45a4a96 Add simple binary utility tests 2013-11-05 18:02:25 -06:00
kpdecker eea708a18d Fix empty string compilation 2013-11-04 22:11:53 -06:00
kpdecker ded0a1617f Protect context-lookups from undefined values
Fixes #166
Fixes #587
2013-11-03 10:58:37 -06:00
kpdecker 31f7c25a8f Use ~ rather than () for whitespace control. 2013-10-14 22:50:50 -05:00
kpdecker 5b483ff78d Define test cases 2013-10-14 22:50:50 -05:00
kpdecker 6f94fc0a3b Reduce eval scope in test env 2013-10-14 22:49:23 -05:00
kpdecker 84049bf0c5 Add includeZero flag to if conditional
Allows for users who desire non-falsy handling of numbers to utilize if while maintaining the legacy if behavior.

Fixes #608
2013-10-14 21:38:19 -05:00
kpdecker 3702efee5b Merge branch 'fix-issue-599' of github.com:laurie71/handlebars.js into laurie71-fix-issue-599 2013-10-14 20:44:42 -05:00
Daniel Marcotte 468fa8b6dd Fix "\\" escaping
Previously, "\\{{foo}}" would only result in the desired "\fooValue" if
it was at the beginning of the file or immediately after a close stache.
2013-10-13 09:03:02 -04:00
denniskuczynski e20591b49d Add @first and @last data variables to #each helper resolving Issue #483 2013-10-12 16:43:17 -05:00
kpdecker 3b0a3ca1b2 Fix test runners under node 2013-10-09 03:22:05 -07:00
kpdecker 4d7124f6bf Remove global Handlebars references 2013-10-09 03:21:21 -07:00
kpdecker fd09ff0e1b Expose current Handlebars namespace fields 2013-10-01 21:41:09 -05:00
kpdecker a2687fdf50 Fix cjs output and testing 2013-09-02 18:19:37 -05:00
kpdecker cb0c45b29f Merge branch 'master' into es6-modules
Conflicts:
	Gruntfile.js
	Rakefile
	dist/handlebars.js
	dist/handlebars.runtime.js
	lib/handlebars.js
	lib/handlebars/base.js
	lib/handlebars/runtime.js
	lib/handlebars/utils.js
	package.json
2013-09-02 18:19:18 -05:00
kpdecker 192887cedc Merge commit '87b5d4ee61605b026506e92c9e8873d867c5f150' into es6-modules
Conflicts:
	dist/handlebars.js
	dist/handlebars.runtime.js
	lib/handlebars/base.js
	lib/handlebars/utils.js
2013-09-02 16:19:28 -05:00
kpdecker 530f1903aa Merge branch 'else-if' into es6-modules
Conflicts:
	dist/handlebars.js
2013-08-30 18:33:37 -05:00
Laurie Harper 03ef3d4258 Test cases for #599 2013-08-28 12:51:54 -04:00
kpdecker 94e5ab8593 Add additional @data tests 2013-08-24 12:05:43 -05:00
kpdecker 534d0ebcc3 Add test case 2013-08-15 10:29:37 -05:00
kpdecker 4f5c05ffe9 Simplify inverse only block case 2013-07-30 11:08:46 -05:00
Yehuda Katz d33408fcbd Move more testing mutations into the environment 2013-07-26 17:18:56 +00:00
Yehuda Katz 5f664dd78b Make the Handlebars environment into an object
The idea is that the environment wraps up the mutable stuff in
Handlebars (like the helpers) and that you could theoretically create a
new one at any time and pass it in to Handlebars.template.

Every test makes a new environment and uses it in template compilation.
2013-07-26 16:50:37 +00:00
kpdecker dcbc3a55a4 Prevent nonsensical root {{^}} 2013-07-24 23:50:12 -05:00
Yehuda Katz f5c8484ea0 Further progress towards modularization.
At this point, I have only 2 fails in the Node build, but I'm doing a
bunch of manual stuff locally and still have a bunch of hacks.
2013-07-24 05:03:27 +00:00
kpdecker bcc8d00e89 Remove incorrectly commited test file 2013-06-01 23:57:21 -05:00
kpdecker adda0569e0 Refactor qunit unit tests
Allows for testing node, browser, and precompiled modes in the node
tests. Also reorganizes the qunit spec file to provide better
organization.
2013-06-01 23:45:43 -05:00
kpdecker d13ae310d3 Convert parser and tokenizer tests to javascript 2013-06-01 16:25:45 -05:00
kpdecker 16fd601a5c Merge global and passed helpers and partials 2013-05-31 13:12:06 -04:00
kpdecker ef062adcc2 Move external AST tests into qunit spec 2013-05-31 13:11:22 -04:00
kpdecker d7b345b2da Allow execution of helpers on the context
Fixes #285
2013-05-30 15:47:30 -04:00
kpdecker 58a0b4f17d Require matching braces in escaped expressions
Fixes #437
2013-05-29 15:30:50 -04:00
kpdecker c540d7186a Allow function arguments to with and each
Via @mcdan
Fixes #239
2013-05-29 12:23:55 -04:00
kpdecker 293672432b improve error message on missing helper
Via @stefanpenner
Fixes #523
2013-05-29 10:57:48 -04:00
kpdecker da2aabe7bd Allow ID, STRING, or INTEGER for partial name
Fixes #519
2013-05-29 10:46:28 -04:00
kpdecker 3ddbc5237f Protect from object prototype modifications
Fixes #534
2013-05-28 17:03:07 -04:00
kpdecker 2c8dd74997 Add unescaped tokenizer tests 2013-05-27 14:59:45 -05:00
kpdecker 822a8911ec Add support for complex ids in @data references 2013-05-27 14:40:52 -05:00
kpdecker c1020a0130 Add unicode support for ID tokens
Fixes #433
Fixes #469
2013-05-27 11:56:28 -05:00
James Gorrie f5fe6d0bf6 Allowed for points to be in partial path name 2013-05-17 16:58:34 +01:00
Jesse Clark d649b3581e Only run "require" tests when require() is available 2013-05-15 10:50:01 +10:00
Jesse Clark 229b82bef5 Add unit tests for require() handler 2013-05-15 10:38:45 +10:00
Kevin Decker 075fdb8ac4 Merge pull request #454 from leshill/fix_string_mode_contexts
Add contexts for string mode hash values
2013-04-07 17:21:40 -07:00
kpdecker 4429ffa9f3 Allow multiple partial and helper registration
Fixes #369
2013-04-07 18:04:51 -05:00
kpdecker 73f2016a6a Remove FULL_CONTEXT from spec_helper 2013-04-07 16:50:57 -05:00
kpdecker f6ff5c648b Restore knownHelpersOnly throw
Fixes #302
2013-04-06 23:23:40 -05:00
kpdecker 4d66d0c0a6 Escape unicode newlines in string literals
Fixes #375
2013-04-06 16:42:24 -05:00
kpdecker e33d9b4dcf Add test case for GH-458 2013-04-06 15:28:27 -05:00