mirror of
https://github.com/rclone/rclone.git
synced 2026-01-06 02:23:24 +00:00
lsf: add --absolute flag to add a leading / onto path names
This commit is contained in:
@@ -726,6 +726,13 @@ func TestListFormat(t *testing.T) {
|
||||
assert.Contains(t, list.Format(items[0]), "/")
|
||||
assert.Equal(t, "inode/directory", list.Format(items[1]))
|
||||
|
||||
list.SetOutput(nil)
|
||||
list.AddPath()
|
||||
list.SetAbsolute(true)
|
||||
assert.Equal(t, "/a", list.Format(items[0]))
|
||||
list.SetAbsolute(false)
|
||||
assert.Equal(t, "a", list.Format(items[0]))
|
||||
|
||||
list.SetOutput(nil)
|
||||
list.AddSize()
|
||||
assert.Equal(t, "1", list.Format(items[0]))
|
||||
|
||||
Reference in New Issue
Block a user