(t *testing.T)
| 181 | } |
| 182 | |
| 183 | func TestFormatFileMetadataWithOptsLongShortTime(t *testing.T) { |
| 184 | ts := time.Date(2025, 3, 15, 10, 30, 0, 0, time.UTC) |
| 185 | meta := &files.FileMetadata{ |
| 186 | Metadata: files.Metadata{PathDisplay: "/test.txt"}, |
| 187 | Rev: "abc", |
| 188 | Size: 4096, |
| 189 | ServerModified: dropbox.DBXTime(ts), |
| 190 | } |
| 191 | |
| 192 | got := formatFileMetadataWithOpts(meta, listOptions{long: true, timeFormat: "short"}) |
| 193 | if !stringContains(got, "2025-03-15 10:30") { |
| 194 | t.Errorf("long short-time format should contain absolute time, got %q", got) |
| 195 | } |
| 196 | if !stringContains(got, "4.0 KiB") { |
| 197 | t.Errorf("long format should contain size, got %q", got) |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | func TestFormatFileMetadataWithOptsClientTime(t *testing.T) { |
| 202 | server := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) |
nothing calls this directly
no test coverage detected