From 59fb7d7eeff9afdac5f706274354e137cdfb290d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 12 Oct 2016 11:28:59 +0300 Subject: [PATCH] failing tests for #5102 --- test/translator-new.js | 9 ++++++++- test/translator.js | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test/translator-new.js b/test/translator-new.js index 22ddf4e9d5..cdb854ea82 100644 --- a/test/translator-new.js +++ b/test/translator-new.js @@ -108,7 +108,7 @@ describe('new Translator(language)', function(){ }); it('should properly escape % and ,', function(done) { - var translator = new Translator('en_GB'); + var translator = new Translator('en_GB'); var title = 'Test 1, 2, 3 % salmon'; title = title.replace(/%/g, '%').replace(/,/g, ','); @@ -126,6 +126,13 @@ describe('new Translator(language)', function(){ done(); }); + it('should not translate [[derp] some text', function(done) { + var translator = new Translator('en_GB'); + translator.translate('[[derp] some text').then(function(translated) { + assert.strictEqual('[[derp] some text', translated); + done(); + }); + }); }); }); diff --git a/test/translator.js b/test/translator.js index f1ceeaed0d..40f5d42ec1 100644 --- a/test/translator.js +++ b/test/translator.js @@ -112,5 +112,12 @@ describe('translator adaptor', function(){ done(); }); }); + + it('should not translate [[derp] some text', function(done) { + translator.translate('[[derp] some text', function(translated) { + assert.strictEqual('[[derp] some text', translated); + done(); + }); + }); }); });