From 3d99e0f6dee6569ca9471d419bda79aec95b9ebc Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 28 Jan 2010 20:44:34 -0800 Subject: work --- src/Angular.js | 1 + src/Formaters.js | 6 ++++++ src/Scope.js | 2 +- test/ApiTest.js | 2 +- test/FormatersTest.js | 6 ++++++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 src/Formaters.js create mode 100644 test/FormatersTest.js diff --git a/src/Angular.js b/src/Angular.js index bfbe8ee9..b208d0ec 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -26,6 +26,7 @@ var consoleNode, jQuery, msie, angular = window['angular'] || (window['angular'] = {}), angularValidator = angular['validator'] || (angular['validator'] = {}), angularFilter = angular['filter'] || (angular['filter'] = {}), + angularFormater = angular['formater'] || (angular['formater'] = {}), angularCallbacks = angular['callbacks'] || (angular['callbacks'] = {}), angularAlert = angular['alert'] || (angular['alert'] = function(){ log(arguments); window.alert.apply(window, arguments); diff --git a/src/Formaters.js b/src/Formaters.js new file mode 100644 index 00000000..e623d6b8 --- /dev/null +++ b/src/Formaters.js @@ -0,0 +1,6 @@ + +extend(angularFormater, { + 'noop':function(){ + + } +}); diff --git a/src/Scope.js b/src/Scope.js index 7e477ec5..b8fadfa0 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -95,7 +95,7 @@ Scope.prototype = { }, eval: function(expressionText, context) { - log('Scope.eval', expressionText); +// log('Scope.eval', expressionText); var expression = Scope.expressionCache[expressionText]; if (!expression) { var parser = new Parser(expressionText); diff --git a/test/ApiTest.js b/test/ApiTest.js index 250a27b1..35cbbd81 100644 --- a/test/ApiTest.js +++ b/test/ApiTest.js @@ -204,7 +204,7 @@ ApiTest.prototype.testQuoteString = function(){ }; ApiTest.prototype.testQuoteStringBug = function(){ - assertEquals(angular.String.quote('"7\\\\\\\"7"', "7\\\"7")); + assertEquals(angular.String.quote("7\\\"7"), '"7\\\\\\\"7"'); }; ApiTest.prototype.testQuoteUnicode = function(){ diff --git a/test/FormatersTest.js b/test/FormatersTest.js new file mode 100644 index 00000000..0122b6ad --- /dev/null +++ b/test/FormatersTest.js @@ -0,0 +1,6 @@ +TestCase("formaterTest", { + testNoop: function(){ + assertEquals("abc", angular.formater.noop("abc")); + assertEquals("xyz", angular.formater.noop("abc", "xyz")); + } +}); -- cgit v1.2.3