cjksymcjk

This commit is contained in:
2026-01-02 18:50:01 +08:00
parent b4987b24f9
commit 0f8ce47fa1
2 changed files with 35 additions and 46 deletions

View File

@@ -6,14 +6,8 @@ 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` "你:好"
describe "MyLib.cjksymcjk" $ do
it "converts symbols between CJK characters to fullwidth" $ do
applyRules myRules "你 : 好" `shouldBe` "你:好"
applyRules myRules "你.好" `shouldBe` "你。好"
applyRules myRules "你 ? 好" `shouldBe` "你?好"