Commit 166da21e authored by Alex Fishman's avatar Alex Fishman Committed by Han-Wen Nienhuys

make zipfs test compatible with macOS

Darwin amd64 uses uint16 for Stat_t.mode
Signed-off-by: default avatarAlex Fishman <alex@fuse-t.org>
Change-Id: I82de5e2dd0340da4e05e4ccf1bbd162dff33b611
parent e65a2a77
...@@ -95,12 +95,12 @@ func TestTar(t *testing.T) { ...@@ -95,12 +95,12 @@ func TestTar(t *testing.T) {
} }
} else if strings.HasSuffix(k, "/") { } else if strings.HasSuffix(k, "/") {
if got, want := st.Mode, uint32(syscall.S_IFDIR|0464); got != want { if got, want := uint32(st.Mode), uint32(syscall.S_IFDIR|0464); got != want {
t.Errorf("dir %q: got mode %o, want %o", k, got, want) t.Errorf("dir %q: got mode %o, want %o", k, got, want)
} }
} else { } else {
if got, want := st.Mode, uint32(syscall.S_IFREG|0464); got != want { if got, want := uint32(st.Mode), uint32(syscall.S_IFREG|0464); got != want {
t.Errorf("entry %q, got mode %o, want %o", k, got, want) t.Errorf("entry %q, got mode %o, want %o", k, got, want)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment