Skip to content

Commit

Permalink
Merge pull request #11 from veridit/master
Browse files Browse the repository at this point in the history
Test extra .env cases
  • Loading branch information
icyleaf authored Nov 12, 2024
2 parents f9e2906 + fc8dbcf commit 11f10e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
# Libraries don't need dependency lock
# Dependencies will be locked in application that uses them
/shard.lock
.aider*
.env
4 changes: 3 additions & 1 deletion spec/fixtures/parse_sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ MULTIPLE_VARIABLE2=$STR$INT1
SINGLE_BLOCK_VARIABLE=${STR}${INT}
SINGLE_QUOTES_VARIABLE='hello $STR!'
DOUBLE_QUOTES_VARIABLE="hello ${STR}, my email is $USERNAME"
UNQUOTED_VARIABLE=Hello there!
EMPTY_VARIABLE=

LIST_STR='foo,bar'
LIST_STR_WITH_SPACES=' foo, bar'
Expand All @@ -38,4 +40,4 @@ DICT_STR=key1=val1, key2=val2
DICT_INT=key1=1, key2=2
JSON='{"foo": "bar", "baz": [1, 2, 3]}'
RETAIN_INNER_QUOTES={"foo": "bar"}
RETAIN_INNER_QUOTES_AS_STRING='{"foo": "bar"}'
RETAIN_INNER_QUOTES_AS_STRING='{"foo": "bar"}'
2 changes: 2 additions & 0 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def it_equal_group(data = nil, file = __FILE__, line = __LINE__)
it_equal data, "SINGLE_BLOCK_VARIABLE", "foo42", file, line
it_equal data, "SINGLE_QUOTES_VARIABLE", "hello $STR!", file, line
it_equal data, "DOUBLE_QUOTES_VARIABLE", "hello foo, my email is user@example.com", file, line
it_equal data, "UNQUOTED_VARIABLE", "Hello there!", file, line
it_equal data, "EMPTY_VARIABLE", "", file, line
end

def it_equal(data, key, expected, file = __FILE__, line = __LINE__)
Expand Down

0 comments on commit 11f10e6

Please sign in to comment.