@@ -16,7 +16,7 @@ import (
1616var testdataConfigFS embed.FS
1717
1818func TestParse (t * testing.T ) {
19- t .Parallel ()
19+ // t.Parallel() not possible
2020
2121 testcases := fftest.TestCases {
2222 {
@@ -134,13 +134,20 @@ func TestParse(t *testing.T) {
134134 Options : []ff.Option {ff .WithEnvVarPrefix ("TEST_PARSE" ), ff .WithEnvVarSplit ("xx" )},
135135 Want : fftest.Vars {S : `axxb` , X : []string {`one` , `twoxxthree` }},
136136 },
137+ {
138+ Name : "env var provided but empty" ,
139+ Default : fftest.Vars {S : "non-empty-default" , I : 42 , F : 1.23 },
140+ Environment : map [string ]string {"TEST_PARSE_S" : "" },
141+ Options : []ff.Option {ff .WithEnvVarPrefix ("TEST_PARSE" )},
142+ Want : fftest.Vars {S : "" , I : 42 , F : 1.23 },
143+ },
137144 }
138145
139146 testcases .Run (t )
140147}
141148
142149func TestParse_FlagSet (t * testing.T ) {
143- t .Parallel ()
150+ // t.Parallel() not possible
144151
145152 testcases := fftest.TestCases {
146153 {
@@ -271,7 +278,7 @@ func TestParse_FlagSet(t *testing.T) {
271278}
272279
273280func TestParse_StdFlagSetAdapter (t * testing.T ) {
274- t .Parallel ()
281+ // t.Parallel() not possible
275282
276283 testcases := fftest.TestCases {
277284 {
@@ -312,7 +319,7 @@ func TestParse_StdFlagSetAdapter(t *testing.T) {
312319}
313320
314321func TestParse_PlainParser (t * testing.T ) {
315- t .Parallel ()
322+ // t.Parallel() not possible
316323
317324 testcases := fftest.TestCases {
318325 {
0 commit comments