Files
bl/common/utils/goja/builtin_global_test.go
昔念 10eed9418c refactor(common): 重构 Conn 实体并优化地图进入逻辑
- 优化 Conn 实体的 SendPack 方法,提高代码复用性
- 添加 goja 模块到 go.work 文件
- 重构地图进入逻辑,增加玩家广播和刷怪功能
- 调整 OutInfo 结构中的 Vip 和 Viped 字段类型
- 简化 MonsterRefresh 结构体定义
2025-08-18 00:38:14 +08:00

22 lines
407 B
Go

package goja
import (
"testing"
)
func TestEncodeURI(t *testing.T) {
const SCRIPT = `
encodeURI('тест')
`
testScript(SCRIPT, asciiString("%D1%82%D0%B5%D1%81%D1%82"), t)
}
func TestDecodeURI(t *testing.T) {
const SCRIPT = `
decodeURI("http://ru.wikipedia.org/wiki/%d0%ae%D0%bd%D0%B8%D0%BA%D0%BE%D0%B4")
`
testScript(SCRIPT, newStringValue("http://ru.wikipedia.org/wiki/Юникод"), t)
}