mirror of
https://github.com/dotenvx/dotenvx.git
synced 2026-01-05 21:29:35 -06:00
additional tests
This commit is contained in:
@@ -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!'
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user