first commit

This commit is contained in:
2026-01-02 15:26:19 +08:00
commit 272b1a9a77
9 changed files with 1140 additions and 0 deletions

19
test/Main.hs Normal file
View File

@@ -0,0 +1,19 @@
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import MyLib
import Test.Hspec
main :: IO ()
main = hspec $ do
describe "MyLib.mapemail" $ do
it "maps @ to [at] in emails" $ do
applyRules myRules "aaa@a.com" `shouldBe` "aaa[at]a.com"
describe "MyLib.mapfruits" $ do
it "maps apple to orange" $ do
applyRules myRules "apple" `shouldBe` "orange"
describe "MyLib.fullWidthSymbolRule" $ do
it "你:好" $ do
applyRules myRules "你:好" `shouldBe` "你:好"