Skip to content

Commit

Permalink
change TestPangu to TestSpacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Mar 17, 2015
1 parent 0d0524a commit 995bee5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -29,9 +29,9 @@ import (
)

func main() {
fmt.Println(pangu.Spacing("請問Jackie的鼻子有幾個?123個!"))
fmt.Println(pangu.Spacing("主要成份:眼鏡95%、水3%、垃圾2%"))
fmt.Println(pangu.Spacing("新阿姆斯特朗炫風噴射阿姆斯特朗砲"))
fmt.Println(pangu.Spacing(`請問Jackie的鼻子有幾個?123個!`))
fmt.Println(pangu.Spacing(`主要成份:眼鏡95%、水3%、垃圾2%。`))
fmt.Println(pangu.Spacing(`新阿姆斯特朗炫風噴射阿姆斯特朗砲`))
// Output:
//請問 Jackie 的鼻子有幾個?123 個!
//主要成份:眼鏡 95%、水 3%、垃圾 2%。
Expand Down
6 changes: 3 additions & 3 deletions example_test.go
Expand Up @@ -7,9 +7,9 @@ import (
)

func ExampleSpacing() {
fmt.Println(pangu.Spacing("請問Jackie的鼻子有幾個?123個!"))
fmt.Println(pangu.Spacing("主要成份:眼鏡95%、水3%、垃圾2%。"))
fmt.Println(pangu.Spacing("新阿姆斯特朗炫風噴射阿姆斯特朗砲"))
fmt.Println(pangu.Spacing(`請問Jackie的鼻子有幾個?123個!`))
fmt.Println(pangu.Spacing(`主要成份:眼鏡95%、水3%、垃圾2%。`))
fmt.Println(pangu.Spacing(`新阿姆斯特朗炫風噴射阿姆斯特朗砲`))
// Output:
//請問 Jackie 的鼻子有幾個?123 個!
//主要成份:眼鏡 95%、水 3%、垃圾 2%。
Expand Down
2 changes: 1 addition & 1 deletion pangu_test.go
Expand Up @@ -58,7 +58,7 @@ var testCases = map[string]string{
`前面" "後面`: `前面 " " 後面`,
}

func TestPangu(t *testing.T) {
func TestSpacing(t *testing.T) {
for old, s := range testCases {
assert.Equal(t, Spacing(old), s)
}
Expand Down

0 comments on commit 995bee5

Please sign in to comment.