-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfs_test.go
More file actions
47 lines (41 loc) · 723 Bytes
/
fs_test.go
File metadata and controls
47 lines (41 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package fsconvert
import (
"io"
"os"
//"io/fs"
"testing"
)
func TestFS(t *testing.T) {
var out io.Writer
if testing.Verbose() {
out = os.Stdout
} else {
out = io.Discard
}
var fsys FS
fsys.WriteFile("uno/one", []byte("1"), 0666)
fsys.WriteFile("dos/two", []byte("2"), 0444)
fsys.WriteFile("tres/three", []byte("3"), 0751)
fsys.WriteFile("foo/bar", []byte{1, 2, 3}, 0)
fsys.WriteFile("hola", []byte("123"), 0640)
err := PrintTree(fsys, out)
if err != nil {
t.Log(err)
t.Fail()
}
}
/*
func TestPrintTree(t *testing.T) {
var out io.Writer
if testing.Verbose() {
out = os.Stdout
} else {
out = io.Discard
}
err := PrintTree(content, out)
if err != nil {
t.Log(err)
t.Fail()
}
}
*/