--- parser3/tests/097.html 2007/03/13 09:26:42 1.5
+++ parser3/tests/097.html 2007/04/23 15:51:55 1.6
@@ -1,15 +1,20 @@
+@main[]
+$response:charset[UTF-8]
+$request:charset[UTF-8]
+
$file[^file::load[binary;http://www.parser.ru/none/;
$.headers[
$.USER-AGENT[paf]
]
+ $.timeout(10)
$.any-status(1)
]]
#server: $file.SERVER
$file.status
-
#$file.text
+
^try{
$file[^file::load[binary;http://www.parser.ru/xmlview.xsl;
$.timeout(10)
@@ -45,3 +50,38 @@ $file.status
can't load local xdoc.
$exception.handled(1)
}
+
+
+
+Loading remote file in windows-1251:
+^try{
+ $file[^file::load[text;http://www.parser.ru/_/tests/097.html;
+ $.charset[windows-1251]
+ $.timeout(10)
+ $.form[
+ $.charset[windows-1251]
+ $.title[Проверка]
+ ]
+ ]]
+ $file.text
+}{
+ $exception.handled(1)
+ can't load remote file.
+}
+
+
+
+Loading remote file in UTF-8:
+^try{
+ $file[^file::load[text;http://www.parser.ru/_/tests/097.html;
+ $.timeout(10)
+ $.form[
+ $.charset[UTF-8]
+ $.title[Проверка]
+ ]
+ ]]
+ $file.text
+}{
+ $exception.handled(1)
+ can't load remote file.
+}