--- parser3/tests/346-curl.html 2016/08/04 16:27:39 1.3 +++ parser3/tests/346-curl.html 2016/12/02 22:27:18 1.7 @@ -1,58 +1,72 @@ @main[] -^try-catch{ ^curl:info[] } -^try-catch{ ^curl:options[ $.charset[UTF-8] ] } -^try-catch{ ^curl:options[ $.url[http://parser.ru/] ] } +1. ^try-catch{ ^curl:info[] } +2. ^try-catch{ ^curl:options[ $.charset[UTF-8] ] } +3. ^try-catch{ ^curl:options[ $.url[http://parser.ru/] ] } -^curl:session{ $s[^curl:version[]] } +4. ^curl:session{ $s[^curl:version[]] } -^try-catch{ ^curl:options[ $.library[no-such-library.so] ] } +5. ^try-catch{ ^curl:options[ $.library[no-such-library.so] ] } ^curl:session{ - ^try-catch{ ^curl:options[ $.url[ftp://parser.ru/] ] } - ^try-catch{ ^curl:options[ $.httppost[ $.name[ $.hash[] ]] ] } - ^try-catch{ ^curl:options[ $.no-such-option[] ] } - ^try-catch{ ^curl:info[no-such-info] } - ^json:string[^curl:info[]] + 6. ^try-catch{ ^curl:options[ $.url[ftp://parser.ru/] ] } + 7. ^try-catch{ ^curl:options[ $.httppost[ $.name[ $.hash[] ]] ] } + 8. ^try-catch{ ^curl:options[ $.httppost[string] ] } + 8.1. ^try-catch{ ^curl:options[ $.httppost{code} ] } + + 8.2. ^try-catch{ ^curl:options[ $.httpheader[string] ] } + 8.3. ^try-catch{ ^curl:options[ $.httpheader{code} ] } + 8.4. ^try-catch{ ^curl:options[ $.httpheader{ } ] } + + 9. ^try-catch{ ^curl:options[ $.no-such-option[] ] } + 10. ^try-catch{ ^curl:info[no-such-info] } + 11. ^json:string[^curl:info[]] ^curl:options[ $.url[http://www.parser.ru/_/tests/readme] $.timeout(5) ] - $f[^curl:load[ + 12. $f[^curl:load[ $.range[4-] ]] $f.text $f.CONTENT-RANGE - $f[^curl:load[ + 13. $f[^curl:load[ $.range[33-] ]] $f.text $f.CONTENT-RANGE } -^show[text;^curl:load[ - $.url[http://www.parser.ru/_/tests/223.pl] - $.timeout(5) +14. ^show[text; $.postfields[test] $.useragent[^taint[parser 3]] $.name[test.txt] $.mode[binary] $.content-type[something/text] -]] +] -^show[binary;^curl:load[ - $.url[http://www.parser.ru/_/tests/223.pl] - $.timeout(5) +15. ^show[binary; $.postfields[^file::load[binary;155.cfg]] -]] +] -^try-catch{ ^curl:load[ $.url[http://no-such-domain.parser.ru/] ] } +16. ^show[empty post; + $.httppost[] +] + +17. ^try-catch{ ^curl:load[ $.url[http://no-such-domain.parser.ru/] ] } + +@show[title;options][f;text;t;post] + +$f[^curl:load[ + $options + $.timeout(5) + $.url[http://www.parser.ru/_/tests/223.pl] +]] -@show[title;f] $title : { "name":"$f.name", "size":$f.size,