Ariver
2026-06-14 e86df221fa8f9d6796fb7fe59020767d7c806fac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package textproc
 
import "testing"
 
func TestPostProcessRemovesSpacesBetweenCJK(t *testing.T) {
    got := PostProcess("请 你 根 据 官 网")
    want := "请你根据官网"
    if got != want {
        t.Fatalf("PostProcess() = %q, want %q", got, want)
    }
}
 
func TestPostProcessKeepsSpaceBetweenCJKAndEnglish(t *testing.T) {
    got := PostProcess("请 你 open AI")
    want := "请你 open AI"
    if got != want {
        t.Fatalf("PostProcess() = %q, want %q", got, want)
    }
}
 
func TestPostProcessKeepsEnglishWordSpaces(t *testing.T) {
    got := PostProcess("open source speech recognition")
    want := "Open source speech recognition"
    if got != want {
        t.Fatalf("PostProcess() = %q, want %q", got, want)
    }
}