diff options
author | Nuno Lopes <nlopess@php.net> | 2006-06-13 21:55:38 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-06-13 21:55:38 +0000 |
commit | c93dc5d873981377b99c33019bda5b2319604e5e (patch) | |
tree | 5c9dbf72e057a7e6613a22314d2c98b1dd2e4691 /ext/pcre/tests/backtrack_limit.phpt | |
parent | 9660548a22c998b5110867cef20c7aa2a9d25f3b (diff) | |
download | php-git-c93dc5d873981377b99c33019bda5b2319604e5e.tar.gz |
add new tests, increasing coverage by about 10%
Diffstat (limited to 'ext/pcre/tests/backtrack_limit.phpt')
-rw-r--r-- | ext/pcre/tests/backtrack_limit.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pcre/tests/backtrack_limit.phpt b/ext/pcre/tests/backtrack_limit.phpt new file mode 100644 index 0000000000..ebfd720c3c --- /dev/null +++ b/ext/pcre/tests/backtrack_limit.phpt @@ -0,0 +1,19 @@ +--TEST-- +Backtracking limit +--INI-- +pcre.backtrack_limit=2 +--FILE-- +<?php + +var_dump(preg_match_all('/.*\p{N}/', '0123456789', $dummy)); +var_dump(preg_last_error() === PREG_BACKTRACK_LIMIT_ERROR); + +var_dump(preg_match_all('/\p{Nd}/', '0123456789', $dummy)); +var_dump(preg_last_error() === PREG_NO_ERROR); + +?> +--EXPECT-- +int(0) +bool(true) +int(10) +bool(true) |