mapper_windows_test: assert.NotZero for nil check (#396)

Follow up to #394, specifically [this comment][1].

  [1]: https://github.com/alecthomas/kong/pull/394#discussion_r1421683093
This commit is contained in:
Abhinav Gupta
2023-12-10 00:40:40 -08:00
committed by GitHub
parent 3263463a7e
commit 4ca2606342
+1 -1
View File
@@ -33,7 +33,7 @@ func TestWindowsFileMapper(t *testing.T) {
p := mustNew(t, &cli)
_, err := p.Parse([]string{"testdata\\file.txt"})
assert.NoError(t, err)
assert.True(t, cli.File != nil, "File should not be nil")
assert.NotZero(t, cli.File, "File should not be nil")
_ = cli.File.Close()
_, err = p.Parse([]string{"testdata\\missing.txt"})
assert.Error(t, err)