diff --git a/cmd/restic/cmd_ls_test.go b/cmd/restic/cmd_ls_test.go index 21f3d6212..a1fcd479b 100644 --- a/cmd/restic/cmd_ls_test.go +++ b/cmd/restic/cmd_ls_test.go @@ -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())