站点背景功能优化、页脚上边距调整
This commit is contained in:
@@ -36,8 +36,13 @@ func TestNormalizeBgMode(t *testing.T) {
|
||||
if _, ok := NormalizeBgMode("zoom"); ok {
|
||||
t.Fatal("unknown mode should fail")
|
||||
}
|
||||
for _, legacy := range []string{"repeat-x", "repeat-y", "center"} {
|
||||
if _, ok := NormalizeBgMode(legacy); ok {
|
||||
t.Fatalf("legacy mode %s should fail", legacy)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{
|
||||
BgModeCover, BgModeContain, BgModeRepeat, BgModeRepeatX, BgModeRepeatY, BgModeStretch, BgModeCenter,
|
||||
BgModeCover, BgModeContain, BgModeRepeat, BgModeStretch,
|
||||
} {
|
||||
got, ok := NormalizeBgMode(" " + want + " ")
|
||||
if !ok || got != want {
|
||||
|
||||
Reference in New Issue
Block a user