aboutsummaryrefslogtreecommitdiffstats
path: root/i18n/spec/closureI18nExtractorSpec.js
diff options
context:
space:
mode:
authorPete Bacon Darwin2013-04-17 22:13:49 +0100
committerPete Bacon Darwin2013-04-17 22:13:49 +0100
commit695c54c17b3299cd6170c45878b41cb46a577cd2 (patch)
tree00231bfa167c7a188ed59d37b8eb9ae6d6b09d2e /i18n/spec/closureI18nExtractorSpec.js
parent363e4cbf649de4c5206f1904ee76f89301ceaab0 (diff)
downloadangular.js-695c54c17b3299cd6170c45878b41cb46a577cd2.tar.bz2
fix(i18n): escape all chars above \u007f in locale files
Modify the script that writes the locales so all characters above \u007f are escaped Includes the updated locale files after running the closureI18nExtractor. Closes #2417
Diffstat (limited to 'i18n/spec/closureI18nExtractorSpec.js')
-rw-r--r--i18n/spec/closureI18nExtractorSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/i18n/spec/closureI18nExtractorSpec.js b/i18n/spec/closureI18nExtractorSpec.js
index f4f190d5..87a9d455 100644
--- a/i18n/spec/closureI18nExtractorSpec.js
+++ b/i18n/spec/closureI18nExtractorSpec.js
@@ -248,3 +248,14 @@ describe("pluralExtractor", function() {
})
});
+describe("serializeContent", function() {
+ it("should not make any modifications to the content of the locale", function() {
+ var serializedContent = closureI18nExtractor.serializeContent(newTestLocaleInfo());
+ expect(eval("(" + serializedContent + ")")).toEqual(newTestLocaleInfo());
+ });
+ it("should only have ascii characters", function() {
+ var serializedContent = closureI18nExtractor.serializeContent(newTestLocaleInfo());
+ expect((/[^\u0001-\u007f]/).test(serializedContent)).toBe(false);
+ });
+});
+