(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func TestFormatFileMetadataLongIncludesFields(t *testing.T) { |
| 107 | ts := time.Date(2025, 1, 15, 10, 30, 0, 0, time.UTC) |
| 108 | meta := &files.FileMetadata{ |
| 109 | Metadata: files.Metadata{ |
| 110 | PathDisplay: "/data.csv", |
| 111 | }, |
| 112 | Rev: "rev999", |
| 113 | Size: 2048, |
| 114 | ServerModified: dropbox.DBXTime(ts), |
| 115 | } |
| 116 | |
| 117 | got := formatFileMetadata(meta, true) |
| 118 | if !contains(got, "rev999") { |
| 119 | t.Errorf("long format should contain rev, got %q", got) |
| 120 | } |
| 121 | if !contains(got, "2.0 KiB") { |
| 122 | t.Errorf("long format should contain human size, got %q", got) |
| 123 | } |
| 124 | if !contains(got, "/data.csv") { |
| 125 | t.Errorf("long format should contain path, got %q", got) |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | func TestGetFileMetadataNotCalledForRoot(t *testing.T) { |
| 130 | // This test verifies the ls function logic: |
nothing calls this directly
no test coverage detected