v/vlib/http/http_test.v

22 lines
492 B
Go
Raw Normal View History

import net.urllib
2019-08-06 17:31:45 +02:00
//import http
fn test_escape_unescape() {
/*
original := 'те ст: т\\%'
escaped := urllib.query_escape(original) or { assert false return}
assert escaped == '%D1%82%D0%B5%20%D1%81%D1%82%3A%20%D1%82%5C%25'
unescaped := urllib.query_unescape(escaped) or { assert false return }
assert unescaped == original
*/
}
2019-08-06 13:57:58 +02:00
fn test_http_get() {
2019-08-06 17:31:45 +02:00
/*
$if windows { return }
2019-08-06 13:57:58 +02:00
assert http.get_text('https://vlang.io/version') == '0.1.5'
println('http ok')
2019-08-06 17:31:45 +02:00
*/
2019-08-06 13:57:58 +02:00
}