mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add MapContentType to redbean (#566)
This commit is contained in:
parent
8cab92a069
commit
91a3252434
3 changed files with 66 additions and 4 deletions
|
@ -21,3 +21,12 @@ assert(0200 == 128)
|
|||
assert("\e" == "\x1b")
|
||||
assert("hi" * 3 == "hihihi")
|
||||
assert("hello %d" % {123} == "hello 123")
|
||||
|
||||
-- test MapContentType
|
||||
assert(MapContentType("txt") == "text/plain")
|
||||
assert(MapContentType("htm") == "text/html")
|
||||
assert(MapContentType("abc.htm") == "text/html")
|
||||
assert(MapContentType("1") == nil)
|
||||
MapContentType("1", "text/x-foo")
|
||||
assert(MapContentType("1"), "text/x-foo")
|
||||
assert(MapContentType("file.1"), "text/x-foo")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue