1package goja 2 3import ( 4 "testing" 5) 6 7func TestEncodeURI(t *testing.T) { 8 const SCRIPT = ` 9 encodeURI('тест') 10 ` 11 12 testScript1(SCRIPT, asciiString("%D1%82%D0%B5%D1%81%D1%82"), t) 13} 14 15func TestDecodeURI(t *testing.T) { 16 const SCRIPT = ` 17 decodeURI("http://ru.wikipedia.org/wiki/%d0%ae%D0%bd%D0%B8%D0%BA%D0%BE%D0%B4") 18 ` 19 20 testScript1(SCRIPT, newStringValue("http://ru.wikipedia.org/wiki/Юникод"), t) 21} 22