The first public release of Fabled Minstrel #158
@@ -172,7 +172,11 @@ func TestAFailedWriteFileLeavesNothingBehind(t *testing.T) {
|
|||||||
|
|
||||||
func TestFileNamesSortByTimeAndAreRecognised(t *testing.T) {
|
func TestFileNamesSortByTimeAndAreRecognised(t *testing.T) {
|
||||||
earlier := FileName(time.Date(2026, 1, 9, 23, 0, 0, 0, time.UTC))
|
earlier := FileName(time.Date(2026, 1, 9, 23, 0, 0, 0, time.UTC))
|
||||||
later := FileName(time.Date(2026, 1, 10, 1, 0, 0, 0, time.FixedZone("x", 5*3600)))
|
// 01:00 at UTC-5 is 06:00 UTC: the name is in UTC, not the clock's zone.
|
||||||
|
later := FileName(time.Date(2026, 1, 10, 1, 0, 0, 0, time.FixedZone("x", -5*3600)))
|
||||||
|
if later != "minstrel-20260110T060000Z.tar" {
|
||||||
|
t.Errorf("name = %s, want it in UTC", later)
|
||||||
|
}
|
||||||
if earlier >= later {
|
if earlier >= later {
|
||||||
t.Errorf("%s does not sort before %s", earlier, later)
|
t.Errorf("%s does not sort before %s", earlier, later)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user