aboutsummaryrefslogtreecommitdiffstats
path: root/test/ParserTest.js
diff options
context:
space:
mode:
authorMisko Hevery2010-03-25 13:01:08 -0700
committerMisko Hevery2010-03-25 13:01:08 -0700
commitb814c79b58deeeeaa12b03261399ef80c0d6cc9f (patch)
treebf28a86070d6c598161bdc9f8937fda51ec5049a /test/ParserTest.js
parentf29f6a47c4d81c5b8e365a3dae307159f1b12968 (diff)
downloadangular.js-b814c79b58deeeeaa12b03261399ef80c0d6cc9f.tar.bz2
checkbox and radio now working
Diffstat (limited to 'test/ParserTest.js')
-rw-r--r--test/ParserTest.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ParserTest.js b/test/ParserTest.js
index c8d323f2..d3813812 100644
--- a/test/ParserTest.js
+++ b/test/ParserTest.js
@@ -52,6 +52,16 @@ LexerTest.prototype.testTokenizeAString = function(){
assertEquals(tokens[i].string, 'd"e');
};
+LexerTest.prototype.testTokenizeUndefined = function(){
+ var lexer = new Lexer("undefined");
+ var tokens = lexer.parse();
+ var i = 0;
+ assertEquals(tokens[i].index, 0);
+ assertEquals(tokens[i].text, 'undefined');
+ assertEquals(undefined, tokens[i].fn());
+};
+
+
LexerTest.prototype.testTokenizeRegExp = function(){
var lexer = new Lexer("/r 1/");
@@ -486,3 +496,10 @@ ParserTest.prototype.testParsingBug = function () {
var scope = new Scope();
assertEquals({a: "-"}, scope.eval("{a:'-'}"));
};
+
+ParserTest.prototype.testUndefined = function () {
+ var scope = new Scope();
+ assertEquals(undefined, scope.eval("undefined"));
+ assertEquals(undefined, scope.eval("a=undefined"));
+ assertEquals(undefined, scope.get("a"));
+};