-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactor] use Data.String.Parser instead of Text.Parser
- Loading branch information
1 parent
70db076
commit b0e07d9
Showing
2 changed files
with
21 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,15 @@ import Network.URL.General | |
private | ||
testParser : List Test | ||
testParser = [ | ||
test "测试解析1" $ assertEq (parse "file://c:/path/file") (Just $ MkGeneralURL "file" "//c:/path/file") | ||
, test "测试解析2" $ assertEq (parse "mailto:[email protected]") (Just $ MkGeneralURL "mailto" "[email protected]") | ||
test "General测试解析1" $ assertEq (parse "file://c:/path/file") (Just $ MkGeneralURL "file" "//c:/path/file") | ||
, test "General测试解析2" $ assertEq (parse "mailto:[email protected]") (Just $ MkGeneralURL "mailto" "[email protected]") | ||
] | ||
|
||
private | ||
testStringify : List Test | ||
testStringify = [ | ||
test "测试解析1" $ assertEq (stringify $ MkGeneralURL "file" "//c:/path/file") "file://c:/path/file" | ||
, test "测试解析2" $ assertEq (stringify $ MkGeneralURL "mailto" "[email protected]") "mailto:[email protected]" | ||
test "General测试序列化1" $ assertEq (stringify $ MkGeneralURL "file" "//c:/path/file") "file://c:/path/file" | ||
, test "General测试序列化2" $ assertEq (stringify $ MkGeneralURL "mailto" "[email protected]") "mailto:[email protected]" | ||
] | ||
|
||
export | ||
|