diff options
author | Marcus Boerger <helly@php.net> | 2006-02-18 17:13:39 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2006-02-18 17:13:39 +0000 |
commit | bb924b320fce6df1e87f6a10cb3c6805a3b54df5 (patch) | |
tree | a0bcd2f5dbee8b511265855b9a598196b7ca02c7 | |
parent | b2565bded0d6c1b91a6855aa29f4b9dc35004d7a (diff) | |
download | php-git-bb924b320fce6df1e87f6a10cb3c6805a3b54df5.tar.gz |
- Add test
-rwxr-xr-x | ext/unicode/tests/iterator_002.phpt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/unicode/tests/iterator_002.phpt b/ext/unicode/tests/iterator_002.phpt new file mode 100755 index 0000000000..1e3ce7447e --- /dev/null +++ b/ext/unicode/tests/iterator_002.phpt @@ -0,0 +1,35 @@ +--TEST-- +Unicode: Iterator and key() +--SKIPIF-- +<?php if (!unicode_semantics()) die('skip unicode_semantics=off'); ?> +--FILE-- +<?php + +foreach(new TextIterator("123") as $pos => $char) +{ + var_dump($pos); + var_dump($char); +} + +foreach(new ReverseTextIterator("123") as $pos => $char) +{ + var_dump($pos); + var_dump($char); +} + +?> +===DONE=== +--EXPECTF-- +int(0) +unicode(1) "1" +int(1) +unicode(1) "2" +int(2) +unicode(1) "3" +int(0) +unicode(1) "3" +int(1) +unicode(1) "2" +int(2) +unicode(1) "1" +===DONE=== |