Annotation of embedaddon/php/ext/standard/tests/file/bug44034.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #44034
! 3: --FILE--
! 4: <?php
! 5:
! 6: $urls = array();
! 7: $urls[] = "data://text/plain,foo\r\nbar\r\n";
! 8: $urls[] = "data://text/plain,\r\nfoo\r\nbar\r\n";
! 9: $urls[] = "data://text/plain,foo\r\nbar";
! 10:
! 11: foreach($urls as $url) {
! 12: echo strtr($url, array("\r" => "\\r", "\n" => "\\n")) . "\n";
! 13: var_dump(file($url, FILE_IGNORE_NEW_LINES));
! 14: }
! 15: ?>
! 16: --EXPECTF--
! 17: data://text/plain,foo\r\nbar\r\n
! 18: array(2) {
! 19: [0]=>
! 20: %unicode|string%(3) "foo"
! 21: [1]=>
! 22: %unicode|string%(3) "bar"
! 23: }
! 24: data://text/plain,\r\nfoo\r\nbar\r\n
! 25: array(3) {
! 26: [0]=>
! 27: %unicode|string%(0) ""
! 28: [1]=>
! 29: %unicode|string%(3) "foo"
! 30: [2]=>
! 31: %unicode|string%(3) "bar"
! 32: }
! 33: data://text/plain,foo\r\nbar
! 34: array(2) {
! 35: [0]=>
! 36: %unicode|string%(3) "foo"
! 37: [1]=>
! 38: %unicode|string%(3) "bar"
! 39: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>