diff --git a/tests/.env.expand b/tests/.env.expand index b16fd2e..2ab6a5f 100644 --- a/tests/.env.expand +++ b/tests/.env.expand @@ -55,7 +55,8 @@ ONETWO_SIMPLE2=$ONE${TWO} ONETWO_SUPER_SIMPLE=$ONE$TWO TWO_DOLLAR_SIGNS_FOLLOWED_BY_DIGIT="abcd$$1234foo" -TWO_DOLLAR_SIGNS_FOLLOWED_BY_LETTER="pa$" +TWO_DOLLAR_SIGNS_FOLLOWED_BY_LETTER="pa$$word@" +TWO_DOLLAR_SIGNS_FOLLOWED_BY_LETTER_SINGLE_QUOTE='pa$$word@' # https://github.com/motdotla/dotenv-expand/issues/80 DONT_CHOKE1='.kZh`>4[,[DDU-*Jt+[;8-,@K=,9%;F9KsoXqOE)gpG^X!{)Q+/9Fc(QF}i[NEi!' diff --git a/tests/lib/config-expand.test.js b/tests/lib/config-expand.test.js index ed0462b..3f8663f 100644 --- a/tests/lib/config-expand.test.js +++ b/tests/lib/config-expand.test.js @@ -293,7 +293,16 @@ t.test('handles two dollar signs followed by letter', ct => { const testPath = 'tests/.env.expand' const env = dotenvx.config({ path: testPath }) - ct.equal(env.parsed.TWO_DOLLAR_SIGNS_FOLLOWED_BY_LETTER, 'pa$') + ct.equal(env.parsed.TWO_DOLLAR_SIGNS_FOLLOWED_BY_LETTER, 'pa$@') + + ct.end() +}) + +t.test('handles two dollar signs followed by letter but single quoted', ct => { + const testPath = 'tests/.env.expand' + const env = dotenvx.config({ path: testPath }) + + ct.equal(env.parsed.TWO_DOLLAR_SIGNS_FOLLOWED_BY_LETTER_SINGLE_QUOTE, 'pa$$word@') ct.end() })