Rename MapContentType to ProgramContentType (#570)

This commit is contained in:
Paul Kulchenko 2022-08-24 09:35:17 -07:00 committed by GitHub
parent d2cec808dc
commit 164e2ab27b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 13 deletions

View file

@ -22,11 +22,11 @@ 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")
-- test ProgramContentType
assert(ProgramContentType("txt") == "text/plain")
assert(ProgramContentType("htm") == "text/html")
assert(ProgramContentType("abc.htm") == "text/html")
assert(ProgramContentType("1") == nil)
ProgramContentType("1", "text/x-foo")
assert(ProgramContentType("1"), "text/x-foo")
assert(ProgramContentType("file.1"), "text/x-foo")