Expand fixture tests to include multiline strings

This commit is contained in:
John Barton 2021-09-24 20:33:25 +10:00
parent dd57617d18
commit 77e8b7d7d6
2 changed files with 14 additions and 0 deletions

View File

@ -7,3 +7,13 @@ OPTION_F="2"
OPTION_G="" OPTION_G=""
OPTION_H="\n" OPTION_H="\n"
OPTION_I = "echo 'asd'" OPTION_I = "echo 'asd'"
OPTION_J='line 1
line 2'
OPTION_K='line one
this is \'quoted\'
one more line'
OPTION_L="line 1
line 2"
OPTION_M="line one
this is \"quoted\"
one more line"

View File

@ -189,6 +189,10 @@ func TestLoadQuotedEnv(t *testing.T) {
"OPTION_G": "", "OPTION_G": "",
"OPTION_H": "\n", "OPTION_H": "\n",
"OPTION_I": "echo 'asd'", "OPTION_I": "echo 'asd'",
"OPTION_J": "line 1\nline 2",
"OPTION_K": "line one\nthis is \\'quoted\\'\none more line",
"OPTION_L": "line 1\nline 2",
"OPTION_M": "line one\nthis is \"quoted\"\none more line",
} }
loadEnvAndCompareValues(t, Load, envFileName, expectedValues, noopPresets) loadEnvAndCompareValues(t, Load, envFileName, expectedValues, noopPresets)