mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
feat: add new settings option to allow external fonts
This commit is contained in:
parent
600dea6ce5
commit
e555e442fb
32 changed files with 257 additions and 56 deletions
|
@ -59,3 +59,21 @@ func TestIsValidRegex(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsValidDomain(t *testing.T) {
|
||||
scenarios := map[string]bool{
|
||||
"example.org": true,
|
||||
"example": false,
|
||||
"example.": false,
|
||||
"example..": false,
|
||||
"mail.example.com:443": false,
|
||||
"*.example.com": false,
|
||||
}
|
||||
|
||||
for domain, expected := range scenarios {
|
||||
result := IsValidDomain(domain)
|
||||
if result != expected {
|
||||
t.Errorf(`Unexpected result, got %v instead of %v`, result, expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue