Bung
2024-01-19 20:11:01 +08:00
committed by GitHub
parent 38f9ee0e58
commit 01097fc1fc
2 changed files with 895 additions and 1766 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,11 @@ template main() =
var m = newMimetypes()
doAssert m.getMimetype("mp4") == "video/mp4"
doAssert m.getExt("application/json") == "json"
doAssert m.getMimetype("json") == "application/json"
m.register("foo", "baa")
doAssert m.getMimetype("foo") == "baa"
doAssert m.getMimetype("txt") == "text/plain"
doAssert m.getExt("text/plain") == "txt"
# see also `runnableExamples`.
# xxx we should have a way to avoid duplicating code between runnableExamples and tests