Skip to content

Commit

Permalink
test deprecated constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed May 10, 2023
1 parent 7b92d17 commit 276047e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,17 @@ func Test_ScopeName(t *testing.T) {
})
}

func TestNewEnv(t *testing.T) {
tm := &testMock{}
tm.SkipGoexit = true
New(tm)

NewEnv(tm)
if len(tm.fatals) == 0 {
t.Fatal("bad double login between new and NewEnv")
}
}

func runUntilFatal(f func()) {
stopped := make(chan bool)
go func() {
Expand Down

0 comments on commit 276047e

Please sign in to comment.