diff options
author | Christian Helbling | 2012-04-04 09:25:06 +0000 |
---|---|---|
committer | Christian Helbling | 2012-04-04 09:25:06 +0000 |
commit | a0231e4df6f8bfa82451c05998bb349ece764610 (patch) | |
tree | 6c1d9e76e8a6388fdf7f1d2435f0da082bd7de62 /tests/it_url.t | |
parent | 1336ce6ac3baacd1cecbf776cfafa81f8d025272 (diff) | |
parent | 14f1c25b43628013507da706544d5c55cb1bc461 (diff) | |
download | itools-a0231e4df6f8bfa82451c05998bb349ece764610.tar.gz itools-a0231e4df6f8bfa82451c05998bb349ece764610.tar.bz2 itools-a0231e4df6f8bfa82451c05998bb349ece764610.zip |
Merged devel-utf8 back into live
Diffstat (limited to 'tests/it_url.t')
-rwxr-xr-x | tests/it_url.t | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/tests/it_url.t b/tests/it_url.t index e8507aa..10fd015 100755 --- a/tests/it_url.t +++ b/tests/it_url.t @@ -87,25 +87,22 @@ is( $url = new it_url('http://www.gna.ch/'); $page = $url->get(); -is( - it::match('(</html>)', $page), - '</html>', +ok( + strpos($page, '</html>'), # UTF8SAFE '$url->get with url in constructor' ); $url = new it_url('http://bogus.url'); $page = $url->get('http://www.gna.ch/'); -is( - it::match('(</html>)', $page), - '</html>', +ok( + strpos($page, '</html>'), # UTF8SAFE '$url->get(url) with url as string arg' ); $url = new it_url('http://bogus.url'); $page = $url->get(array('url' => 'http://www.gna.ch/')); -is( - it::match('(</html>)', $page), - '</html>', +ok( + strpos($page, '</html>'), # UTF8SAFE '$url->get(\'url\' => url) with url as named arg' ); is( @@ -121,15 +118,14 @@ is( unset($url, $page); $page = it_url::get('http://www.gna.ch/'); -is( - it::match('(</html>)', $page), - '</html>', +ok( + strpos($page, '</html>'), # UTF8SAFE 'it_url::get() static call' ); $pages = it_url::get_multi('urls' => array('a' => 'http://www.gna.ch/', 'b' => 'http://search.ch/')); -ok(it::match('</html>', $pages['a']), 'it_url::get_multi got first url'); -ok(it::match('</html>', $pages['b']), 'it_url::get_multi got second url'); +ok(strpos($pages['a'], '</html>'), 'it_url::get_multi got first url'); # UTF8SAFE +ok(strpos($pages['b'], '</html>'), 'it_url::get_multi got second url'); # UTF8SAFE is(count($pages), 2, 'it_url::get_multi no additional array elements'); ?> |