summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/mimetypes.nim4
-rw-r--r--tests/stdlib/tmimetypes.nim5
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/pure/mimetypes.nim b/lib/pure/mimetypes.nim
index e1ad94a57..ff639e8e5 100644
--- a/lib/pure/mimetypes.nim
+++ b/lib/pure/mimetypes.nim
@@ -432,6 +432,10 @@ const mimes* = {
   "msty": "application/vnd.muvee.style",
   "taglet": "application/vnd.mynfc",
   "nlu": "application/vnd.neurolanguage.nlu",
+  "nim": "text/nim",
+  "nimble": "text/nimble",
+  "nimf": "text/nim",
+  "nims": "text/nim",
   "ntf": "application/vnd.nitf",
   "nitf": "application/vnd.nitf",
   "nnd": "application/vnd.noblenet-directory",
diff --git a/tests/stdlib/tmimetypes.nim b/tests/stdlib/tmimetypes.nim
index 372a8f3d8..fd66ebd97 100644
--- a/tests/stdlib/tmimetypes.nim
+++ b/tests/stdlib/tmimetypes.nim
@@ -19,5 +19,10 @@ template main() =
   # see also `runnableExamples`.
   # xxx we should have a way to avoid duplicating code between runnableExamples and tests
 
+  doAssert m.getMimetype("nim") == "text/nim"
+  doAssert m.getMimetype("nimble") == "text/nimble"
+  doAssert m.getMimetype("nimf") == "text/nim"
+  doAssert m.getMimetype("nims") == "text/nim"
+
 static: main()
 main()