From 276047e4349ca2c50abbc494e74d07785cd21a57 Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Wed, 10 May 2023 19:27:55 +0300 Subject: [PATCH] test deprecated constructor --- env_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/env_test.go b/env_test.go index 8dd704a..c36d70c 100644 --- a/env_test.go +++ b/env_test.go @@ -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() {