diff --git a/test/test.js b/test/test.js index 0c0b681c3..055a45811 100644 --- a/test/test.js +++ b/test/test.js @@ -5464,12 +5464,6 @@ assert.strictEqual(_.escape(unescaped), escaped); }); - QUnit.test('should not escape the "/" character', function(assert) { - assert.expect(1); - - assert.strictEqual(_.escape('/'), '/'); - }); - QUnit.test('should handle strings with nothing to escape', function(assert) { assert.expect(1); @@ -5481,6 +5475,14 @@ assert.strictEqual(_.escape(_.unescape(escaped)), escaped); }); + + lodashStable.each(['`', '/'], function(chr) { + QUnit.test('should not escape the "' + chr + '" character', function(assert) { + assert.expect(1); + + assert.strictEqual(_.escape(chr), chr); + }); + }); }()); /*--------------------------------------------------------------------------*/ @@ -24244,12 +24246,6 @@ assert.strictEqual(_.unescape(escaped), unescaped); }); - QUnit.test('should not unescape the "/" entity', function(assert) { - assert.expect(1); - - assert.strictEqual(_.unescape('/'), '/'); - }); - QUnit.test('should handle strings with nothing to unescape', function(assert) { assert.expect(1); @@ -24261,6 +24257,14 @@ assert.strictEqual(_.unescape(_.escape(unescaped)), unescaped); }); + + lodashStable.each(['`', '/'], function(entity) { + QUnit.test('should not unescape the "' + entity + '" entity', function(assert) { + assert.expect(1); + + assert.strictEqual(_.unescape(entity), entity); + }); + }); }()); /*--------------------------------------------------------------------------*/