aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/sandbox/fs.go4
-rw-r--r--test/sandbox/fs_test.go8
2 files changed, 6 insertions, 6 deletions
diff --git a/test/sandbox/fs.go b/test/sandbox/fs.go
index 68dcecfb..2aa3aa5d 100644
--- a/test/sandbox/fs.go
+++ b/test/sandbox/fs.go
@@ -30,7 +30,7 @@ func printDir(prefix string, dir []fs.DirEntry) {
}
names[i] = fmt.Sprintf("%q", name)
}
- printf("[FAIL] d %q: %s", prefix, strings.Join(names, " "))
+ printf("[FAIL] d %s: %s", prefix, strings.Join(names, " "))
}
func (s *FS) Compare(prefix string, e fs.FS) error {
@@ -71,7 +71,7 @@ func (s *FS) Compare(prefix string, e fs.FS) error {
if fi, err := got.Info(); err != nil {
return err
} else if fi.Mode() != want.Mode {
- printf("[FAIL] m %q: %x, want %x",
+ printf("[FAIL] m %s: %x, want %x",
name, uint32(fi.Mode()), uint32(want.Mode))
return ErrFSBadMode
}
diff --git a/test/sandbox/fs_test.go b/test/sandbox/fs_test.go
index 2b122c55..cac5a3f5 100644
--- a/test/sandbox/fs_test.go
+++ b/test/sandbox/fs_test.go
@@ -31,16 +31,16 @@ func TestCompare(t *testing.T) {
"[ OK ] s .fortify\x00[ OK ] d .\x00", nil},
{"bad length", fstest.MapFS{".fortify": {Mode: 0x800001ed}},
&sandbox.FS{Dir: make(map[string]*sandbox.FS)},
- "[FAIL] d \".\": \".fortify/\"\x00", sandbox.ErrFSBadLength},
+ "[FAIL] d .: \".fortify/\"\x00", sandbox.ErrFSBadLength},
{"top level bad mode", fstest.MapFS{".fortify": {Mode: 0x800001ed}},
&sandbox.FS{Dir: map[string]*sandbox.FS{".fortify": {Mode: 0xdeadbeef}}},
- "[FAIL] m \".fortify\": 800001ed, want deadbeef\x00", sandbox.ErrFSBadMode},
+ "[FAIL] m .fortify: 800001ed, want deadbeef\x00", sandbox.ErrFSBadMode},
{"invalid entry condition", fstest.MapFS{"test": {Data: []byte{'0'}, Mode: 0644}},
&sandbox.FS{Dir: map[string]*sandbox.FS{"test": {Dir: make(map[string]*sandbox.FS)}}},
- "[FAIL] d \".\": \"test\"\x00", sandbox.ErrFSInvalidEnt},
+ "[FAIL] d .: \"test\"\x00", sandbox.ErrFSInvalidEnt},
{"nonexistent", fstest.MapFS{"test": {Data: []byte{'0'}, Mode: 0644}},
&sandbox.FS{Dir: map[string]*sandbox.FS{".test": {}}},
- "[FAIL] d \".\": \"test\"\x00", fs.ErrNotExist},
+ "[FAIL] d .: \"test\"\x00", fs.ErrNotExist},
{"file", fstest.MapFS{"etc": {Mode: 0x800001c0},
"etc/passwd": {Data: []byte(fsPasswdSample), Mode: 0644},
"etc/group": {Data: []byte(fsGroupSample), Mode: 0644},