Merge 60e5dcf5946c8af35823b75588ae4e6a8722cac4 into 8763f33c65f7df8be5b9fe7504ab7fcf20abb41d

This commit is contained in:
yxxhero 2025-03-23 09:37:12 +08:00 committed by GitHub
commit 02274e4e0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,7 @@ import (
"strings"
"syscall"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
@ -245,3 +246,20 @@ func TestRecoveryWithWriterWithCustomRecovery(t *testing.T) {
SetMode(TestMode)
}
func TestTimeFormat(t *testing.T) {
tests := []struct {
t time.Time
want string
}{
{
t: time.Date(2009, 11, 10, 23, 0, 0, 0, time.UTC),
want: "2009/11/10 - 23:00:00",
},
}
for _, tt := range tests {
got := timeFormat(tt.t)
assert.Equal(t, tt.want, got)
}
}