MCPcopy Index your code
hub / github.com/writefreely/writefreely / TestPostLede

Function TestPostLede

parse/posts_test.go:15–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13import "testing"
14
15func TestPostLede(t *testing.T) {
16 text := map[string]string{
17 "早安。跨出舒適圈,才能前往": "早安。",
18 "早安。This is my post. It is great.": "早安。",
19 "Hello. 早安。": "Hello.",
20 "Sup? Everyone says punctuation is punctuation.": "Sup?",
21 "Humans are humans, and society is full of good and bad actors. Technology, at the most fundamental level, is a neutral tool that can be used by either to meet any ends. ": "Humans are humans, and society is full of good and bad actors.",
22 `Online Domino Is Must For Everyone
23
24 Do you want to understand how to play poker online?`: "Online Domino Is Must For Everyone",
25 `おはようございます
26
27 私は日本から帰ったばかりです。`: "おはようございます",
28 "Hello, we say, おはよう. We say \"good morning\"": "Hello, we say, おはよう.",
29 }
30
31 c := 1
32 for i, o := range text {
33 if s := PostLede(i, true); s != o {
34 t.Errorf("#%d: Got '%s' from '%s'; expected '%s'", c, s, i, o)
35 }
36 c++
37 }
38}
39
40func TestTruncToWord(t *testing.T) {
41 text := map[string]string{

Callers

nothing calls this directly

Calls 1

PostLedeFunction · 0.85

Tested by

no test coverage detected