Turn some test outputs into actual tests
This commit is contained in:
parent
c433ae1aaa
commit
22db40e5e4
13 changed files with 84 additions and 52 deletions
|
|
@ -516,7 +516,7 @@ proc register*(mimedb: var MimeDB, ext: string, mimetype: string) =
|
|||
## Adds ``mimetype`` to the ``mimedb``.
|
||||
mimedb.mimes[ext] = mimetype
|
||||
|
||||
when not defined(testing) and isMainModule:
|
||||
when isMainModule:
|
||||
var m = newMimetypes()
|
||||
echo m.getMimetype("mp4")
|
||||
echo m.getExt("text/html")
|
||||
assert m.getMimetype("mp4") == "video/mp4"
|
||||
assert m.getExt("text/html") == "html"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue