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
parent 165d39738d
commit fee5fbc722
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()