summaryrefslogtreecommitdiff
path: root/src/tests/ini/ini_regexp.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/ini/ini_regexp.phpt')
-rw-r--r--src/tests/ini/ini_regexp.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tests/ini/ini_regexp.phpt b/src/tests/ini/ini_regexp.phpt
new file mode 100644
index 0000000..f6c5198
--- /dev/null
+++ b/src/tests/ini/ini_regexp.phpt
@@ -0,0 +1,19 @@
1--TEST--
2INI protection .regexp()
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print("skip"); ?>
5--INI--
6sp.configuration_file={PWD}/config/sp.ini
7--FILE--
8<?php
9ini_set("highlight.comment", "#000aBc");
10var_dump(ini_get("highlight.comment"));
11
12ini_set("highlight.comment", "xxx");
13var_dump(ini_get("highlight.comment"));
14?>
15--EXPECTF--
16string(7) "#000aBc"
17
18Warning: [snuffleupagus][0.0.0.0][ini_protection][log] INI value does not match regex in %a/ini_regexp.php on line 5
19string(7) "#000aBc"