mirror of
https://github.com/octoleo/restic.git
synced 2024-12-26 04:17:29 +00:00
ls: extend test sample with a second toplevel file
This commit is contained in:
parent
5671dfb481
commit
bdf24dc8f9
@ -150,13 +150,20 @@ func TestLsNcdu(t *testing.T) {
|
||||
ModTime: modTime,
|
||||
}, false)
|
||||
printer.LeaveDir("/directory")
|
||||
printer.Node("/file", &restic.Node{
|
||||
Type: "file",
|
||||
Name: "file",
|
||||
Size: 12345,
|
||||
ModTime: modTime,
|
||||
}, false)
|
||||
printer.Close()
|
||||
|
||||
rtest.Equals(t, `[1, 2, {"time":"0001-01-01T00:00:00Z","tree":null,"paths":["/example"],"hostname":"host"}, [{"name":"/"},
|
||||
[
|
||||
{"name":"directory","asize":0,"dsize":0,"dev":0,"ino":0,"nlink":0,"notreg":false,"uid":0,"gid":0,"mode":0,"mtime":1577934245},
|
||||
{"name":"data","asize":42,"dsize":512,"dev":0,"ino":0,"nlink":0,"notreg":false,"uid":0,"gid":0,"mode":0,"mtime":1577934245}
|
||||
]
|
||||
],
|
||||
{"name":"file","asize":12345,"dsize":12800,"dev":0,"ino":0,"nlink":0,"notreg":false,"uid":0,"gid":0,"mode":0,"mtime":1577934245}
|
||||
]
|
||||
]
|
||||
`, buf.String())
|
||||
|
Loading…
Reference in New Issue
Block a user