Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

Commit 9f04f40

Browse files
committed
Be more careful with TestRoundtrip
1 parent 9739509 commit 9f04f40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

godotenv_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,20 +351,20 @@ func TestWrite(t *testing.T) {
351351
}
352352

353353
func TestRoundtrip(t *testing.T) {
354-
fixtures := []string{"equals.env", "exported.env", "invalid1.env", "plain.env", "quoted.env"}
354+
fixtures := []string{"equals.env", "exported.env", "plain.env", "quoted.env"}
355355
for _, fixture := range fixtures {
356356
fixtureFilename := fmt.Sprintf("fixtures/%s", fixture)
357357
env, err := readFile(fixtureFilename)
358358
if err != nil {
359-
continue
359+
t.Errorf("Expected '%s' to read without error (%v)", fixtureFilename, err)
360360
}
361361
rep, err := Marshal(env)
362362
if err != nil {
363-
continue
363+
t.Errorf("Expected '%s' to Marshal (%v)", fixtureFilename, err)
364364
}
365365
roundtripped, err := Unmarshal(rep)
366366
if err != nil {
367-
continue
367+
t.Errorf("Expected '%s' to Mashal and Unmarshal (%v)", fixtureFilename, err)
368368
}
369369
if !reflect.DeepEqual(env, roundtripped) {
370370
t.Errorf("Expected '%s' to roundtrip as '%v', got '%v' instead", fixtureFilename, env, roundtripped)

0 commit comments

Comments
 (0)