Rewrite some struct linkages

This commit is contained in:
2026-02-20 21:06:47 +08:00
parent 1d9407331a
commit d54f106dee
10 changed files with 228 additions and 128 deletions

View File

@@ -1,7 +1,6 @@
package cjlookup
import (
"fmt"
"strings"
"testing"
)
@@ -41,5 +40,15 @@ func TestQuery(t *testing.T) {
t.Errorf("Expected 閲62 in response, got \"%s\" instead", mesg)
}
fmt.Println(mesg)
qo = Query("zh-Hant", "jp jeng4 1")
mesg, err = qo.Message()
if strings.Contains(mesg, "同音字") {
t.Error("Unexpected TungJamZi for jeng4")
}
qo = Query("zh-Hant", "jp 數")
mesg, err = qo.Message()
if !strings.Contains(mesg, "異讀: [cuk1]") {
t.Error("Expecting 異讀 from 數")
}
}