summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tmimetypes.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/stdlib/tmimetypes.nim b/tests/stdlib/tmimetypes.nim
new file mode 100644
index 000000000..cd41e614b
--- /dev/null
+++ b/tests/stdlib/tmimetypes.nim
@@ -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()