aboutsummaryrefslogtreecommitdiffstats
path: root/test/ParserTest.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ParserTest.js')
-rw-r--r--test/ParserTest.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ParserTest.js b/test/ParserTest.js
index 058010f3..fbd9f508 100644
--- a/test/ParserTest.js
+++ b/test/ParserTest.js
@@ -460,3 +460,11 @@ ParserTest.prototype.testReturnFunctionsAreNotBound = function(){
assertEquals("direct Group.all", "function", typeof Group.query);
};
+ParserTest.prototype.testDoubleNegationBug = function (){
+ var scope = new Scope();
+ assertEquals(true, scope.eval('true'));
+ assertEquals(false, scope.eval('!true'));
+ assertEquals(true, scope.eval('!!true'));
+ assertEquals('a', scope.eval('{true:"a", false:"b"}[!!true]'));
+};
+