aboutsummaryrefslogtreecommitdiffstats
path: root/i18n/spec/closureI18nExtractorSpec.js
diff options
context:
space:
mode:
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);
+ });
+});
+