添加简单的test

This commit is contained in:
eson 2018-12-24 21:10:17 +08:00
parent 98ff746add
commit ea73b4a9b9

View File

@ -5,7 +5,6 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"log"
"math/rand" "math/rand"
"reflect" "reflect"
"strconv" "strconv"
@ -1445,6 +1444,7 @@ func TestRegexp(t *testing.T) {
func TestChinese(t *testing.T) { func TestChinese(t *testing.T) {
js := `{"data": [{"f":"\"广告"}, {"f": "广告"}]}` js := `{"data": [{"f":"\"广告"}, {"f": "广告"}]}`
mtok := get(js, `data.#[f=""广告"]#`) mtok := get(js, `data.#[f=""广告"]#`)
log.Println(mtok.Array()[0].String()) if mtok.Array()[0].String() != `{"f":"\"广告"}` {
t.Error("") t.Error("error", mtok.Array())
}
} }