lib9p

Go 9P library.
Log | Files | Refs

commit 6c0c7d2380a2bce23c6577c9dfc665764ed71858
parent 22c4440c13b78b8381673379bed69afb3e7822b7
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Tue, 12 Sep 2023 08:04:25 +0900

update uid_test

Diffstat:
Muid_test.go | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/uid_test.go b/uid_test.go @@ -12,6 +12,7 @@ type permFile struct { gid string } +func (f permFile) Parent() (File, error) { return nil, nil } func (f permFile) Child() ([]File, error) { return nil, nil } func (f permFile) Stat() (*FileInfo, error) { return &FileInfo{Stat: Stat{Mode: f.mode, Uid: f.uid, Gid: f.gid}}, nil @@ -33,12 +34,7 @@ func TestHasPerm(t *testing.T) { } for i, test := range tests { - got, err := hasPerm(test.file, test.uid, test.perm) - if err != nil { - t.Errorf("hasPerm: %v", err) - continue - } - if got != test.want { + if got := hasPerm(test.file, test.uid, test.perm); got != test.want { t.Errorf("hasPerm(file[%d], %s, 0%o) == %t\n", i, test.uid, test.perm, got) continue