fix #16703; revert most of #16480; add tests/stdlib/tmimetypes.nim (#16711)

This commit is contained in:
Timothee Cour 2021-01-13 14:52:59 -08:00 • committed by GitHub
commit fee5fbc722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 50 deletions

View file

@ -0,0 +1,13 @@
discard """
targets: "c js"
"""
import std/mimetypes
template main() =
var m = newMimetypes()
doAssert m.getMimetype("mp4") == "video/mp4"
# see also `runnableExamples`.
# xxx we should have a way to avoid duplicating code between runnableExamples and tests
static: main()
main()