Nim/tests/stdlib/tmimetypes.nim
Bung 429b128632
change mimedb stroe stringtable to orderedtable (#18065)
* change mimedb stroe stringtable to orderedtable

* Update lib/pure/mimetypes.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-06-07 13:57:42 +02:00

14 lines
342 B
Nim

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