summaryrefslogtreecommitdiff
path: root/tests/strings
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-10-03 10:47:47 +0000
committerDerick Rethans <derick@php.net>2002-10-03 10:47:47 +0000
commit7ad71ed4420937e40dd9c3cf014f1a084abbc0cf (patch)
tree0ad6373ac7073dadc317caf6345e30bcbc0c296e /tests/strings
parent9f8b57fb57144c580ba9853c7ed8b954337a8520 (diff)
downloadphp-git-7ad71ed4420937e40dd9c3cf014f1a084abbc0cf.tar.gz
- Add highlight_string buffering test
Diffstat (limited to 'tests/strings')
-rw-r--r--tests/strings/004.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/strings/004.phpt b/tests/strings/004.phpt
new file mode 100644
index 0000000000..38a9e9374f
--- /dev/null
+++ b/tests/strings/004.phpt
@@ -0,0 +1,17 @@
+--TEST--
+highlight_string() buffering
+--POST--
+--GET--
+--FILE--
+<?php
+$var = highlight_string("<br /><?php echo \"foo\"; ?><br />");
+$var = highlight_string("<br /><?php echo \"bar\"; ?><br />", TRUE);
+echo "\n[$var]\n";
+?>
+--EXPECT--
+<code><font color="#000000">
+&lt;br /&gt;<font color="#0000BB">&lt;?php </font><font color="#007700">echo </font><font color="#DD0000">"foo"</font><font color="#007700">; </font><font color="#0000BB">?&gt;</font>&lt;br /&gt;</font>
+</code>
+[<code><font color="#000000">
+&lt;br /&gt;<font color="#0000BB">&lt;?php </font><font color="#007700">echo </font><font color="#DD0000">"bar"</font><font color="#007700">; </font><font color="#0000BB">?&gt;</font>&lt;br /&gt;</font>
+</code>]