mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-09 03:10:27 +00:00
Add MapContentType tests
This commit is contained in:
parent
1a856ee1a8
commit
2849382d9c
1 changed files with 9 additions and 0 deletions
|
@ -21,3 +21,12 @@ assert(0200 == 128)
|
||||||
assert("\e" == "\x1b")
|
assert("\e" == "\x1b")
|
||||||
assert("hi" * 3 == "hihihi")
|
assert("hi" * 3 == "hihihi")
|
||||||
assert("hello %d" % {123} == "hello 123")
|
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