Test modern domain parser

master
Philippe Pittoli 2024-01-19 19:32:43 +01:00
parent e1c6a6f1e9
commit 7b5e92490d
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ module Test.Main where
import GenericParser.Parser (Parser(..)) import GenericParser.Parser (Parser(..))
import GenericParser.DomainParser.Common (ldh_str, DomainError(..)) import GenericParser.DomainParser.Common (ldh_str, DomainError(..))
import GenericParser.DomainParserRFC1035 as RFC1035 import GenericParser.DomainParserRFC1035 as RFC1035
import GenericParser.DomainParser as ModernDomains
import Prelude (Unit, discard, show, ($), (<>), map) import Prelude (Unit, discard, show, ($), (<>), map)
import Data.Either (Either(..)) import Data.Either (Either(..))
@ -56,7 +57,8 @@ main = do
"xblah.a5555.org", "xblah.a5555.org",
"xblah.a66666.org", "xblah.a66666.org",
"xblah.a777777.org", "xblah.a777777.org",
"xblah.a8888888.org" "xblah.a8888888.org",
"_dmarc.example.com"
] ]
test_series "ldh_str" ldh_str fromCharArray showerror domains test_series "ldh_str" ldh_str fromCharArray showerror domains
log "" log ""
@ -67,3 +69,5 @@ main = do
test_series "RFC1035.sub_eof" RFC1035.sub_eof id showerror domains test_series "RFC1035.sub_eof" RFC1035.sub_eof id showerror domains
log "" log ""
test_series "RFC1035.domain" RFC1035.domain id showerror domains test_series "RFC1035.domain" RFC1035.domain id showerror domains
log ""
test_series "ModernDomains.domain" ModernDomains.domain id showerror domains