From dbce32ff84743332202fe860a5e3fe36ada299c1 Mon Sep 17 00:00:00 2001 From: doowb Date: Wed, 1 Apr 2020 16:53:22 -0400 Subject: [PATCH] add test for PR #21 --- test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test.js b/test.js index 83ae83a..ea93097 100644 --- a/test.js +++ b/test.js @@ -159,6 +159,12 @@ describe('escaping', function() { set(obj2, 'e\\.f.g\\.h\\.i.j', 1, { escape: true }); assert.deepEqual(obj2, { 'e.f': { 'g.h.i': { j: 1 } } }); }); + + it('should work with escaped dots as the last character', function() { + var o = {}; + set(o, 'a\\.b.c.d\\.e\\.', 'c', { escape: true }); + assert.equal(o['a.b'].c['d.e.'], 'c'); + }); }); describe('options', function() {