Skip to content

Commit fe59a81

Browse files
committed
chore(test): cover unescaped dollar sign in env var
1 parent 928a654 commit fe59a81

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

tests/fixtures.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def generate_data(cls):
6565
BOOL_FALSE_STRING_LIKE_BOOL='False',
6666
BOOL_FALSE_BOOL=False,
6767
PROXIED_VAR='$STR_VAR',
68+
DOLLAR_VAR='SOME_VALUE$S3CR3TK3Y@HELLO',
6869
ESCAPED_VAR=r'\$baz',
6970
INT_LIST='42,33',
7071
INT_TUPLE='(42,33)',

tests/test_env.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ def test_bool_true(self, value, variable):
134134
def test_proxied_value(self):
135135
assert self.env('PROXIED_VAR') == 'bar'
136136

137+
def test_dollar_sign(self):
138+
assert self.env('DOLLAR_VAR') == 'SOME_VALUE$S3CR3TK3Y@HELLO'
139+
137140
def test_escaped_dollar_sign(self):
138141
self.env.escape_proxy = True
139142
assert self.env('ESCAPED_VAR') == '$baz'

tests/test_env.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ FLOAT_STRANGE_VAR1=123,420,333.3
4040
FLOAT_STRANGE_VAR2=123.420.333,3
4141
FLOAT_NEGATIVE_VAR=-1.0
4242
PROXIED_VAR=$STR_VAR
43+
DOLLAR_VAR=SOME_VALUE$S3CR3TK3Y@HELLO
4344
ESCAPED_VAR=\$baz
4445
EMPTY_LIST=
4546
EMPTY_INT_VAR=

0 commit comments

Comments
 (0)