more unit tests
This commit is contained in:
parent
0b1d5d399d
commit
bb1de0e0cc
13
unit.hs
13
unit.hs
|
@ -37,6 +37,17 @@ regex_7 = TestCase (assertEqual
|
|||
[["gemini://perso.pw/directory/\r\n", "gemini://", "perso.pw", "directory/", "", "", "\r\n"]]
|
||||
(parse_url "gemini://perso.pw/../../directory/\r\n"))
|
||||
|
||||
regex_8 = TestCase (assertEqual
|
||||
"directory requested with a query"
|
||||
[["gemini://perso.pw/directory/?query=value\r\n", "gemini://", "perso.pw", "directory/", "?", "query=value", "\r\n"]]
|
||||
(parse_url "gemini://perso.pw/directory/?query=value\r\n"))
|
||||
|
||||
regex_9 = TestCase (assertEqual
|
||||
"directory requested with a query without a trailing slash"
|
||||
[["gemini://perso.pw/directory?query=value\r\n", "gemini://", "perso.pw", "directory", "?", "query=value", "\r\n"]]
|
||||
(parse_url "gemini://perso.pw/directory?query=value\r\n"))
|
||||
|
||||
|
||||
tests = TestList
|
||||
[ regex_1
|
||||
, regex_2
|
||||
|
@ -45,6 +56,8 @@ tests = TestList
|
|||
, regex_5
|
||||
, regex_6
|
||||
, regex_7
|
||||
, regex_8
|
||||
, regex_9
|
||||
]
|
||||
|
||||
main :: IO Counts
|
||||
|
|
Loading…
Reference in New Issue