Debian Codegraph @

debian/patches/0004-check-same-tempdir.patch

raw
1 Description: Use the same tempdir to check across function
2 Author: Nilesh Patra <[email protected]>
3 Last-Update: 2024-07-07
4 --- a/bgzf/bgzf_test.go
5 +++ b/bgzf/bgzf_test.go
6 @@ -108,12 +108,13 @@
7
8 if runtime.GOOS != "windows" {
9 // NOTE: on Windows, os.Open is not allowed for directories.
10 - f, err = os.Open(t.TempDir())
11 + tempdir := t.TempDir()
12 + f, err = os.Open(tempdir)
13 if err != nil {
14 t.Fatalf("Open temp dir: %v", err)
15 }
16 ok, err = HasEOF(f)
17 - if want := "read " + t.TempDir() + ": is a directory"; err.Error() != want {
18 + if want := "read " + tempdir + ": is a directory"; err.Error() != want {
19 t.Errorf("Expected error:%s got:%v", want, err)
20 }
21 if ok {