]> granicus.if.org Git - php/commitdiff
add more tests for the parser. currently both fail
authorNuno Lopes <nlopess@php.net>
Tue, 8 Jul 2008 14:38:31 +0000 (14:38 +0000)
committerNuno Lopes <nlopess@php.net>
Tue, 8 Jul 2008 14:38:31 +0000 (14:38 +0000)
tests/lang/comments.phpt
tests/lang/comments2.phpt [new file with mode: 0644]
tests/lang/script_tag.phpt [new file with mode: 0644]

index 682366ec2742f716a416babdd6a0c5f8fb3e119a..365beffdd71b5a3480b99c44e62141dcb3b17180 100644 (file)
@@ -16,7 +16,7 @@ echo "e este, # hein?";
 echo "\n";
 
 ?>
---EXPECTF--
+--EXPECT--
 #teste2
 #ola
 uhm # ah
diff --git a/tests/lang/comments2.phpt b/tests/lang/comments2.phpt
new file mode 100644 (file)
index 0000000..8d727d9
--- /dev/null
@@ -0,0 +1,9 @@
+--TEST--
+#-style comments (part 2)
+--FILEEOF--
+<?php
+if (1) {
+?>
+#<?php }
+--EXPECT--
+#
diff --git a/tests/lang/script_tag.phpt b/tests/lang/script_tag.phpt
new file mode 100644 (file)
index 0000000..1b5c696
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+<script> tag
+--FILE--
+<script language=php> echo "ola\n";</script>
+<script language="php"> echo "ola2\n";</script>
+<script language='php'> echo "ola3\n";</script>
+texto <sc <s <script> <script language> <script language=>
+<script language=php>
+#comment
+echo "oi\n"; //ignore here
+# 2nd comment
+--EXPECT--
+ola
+ola2
+ola3
+texto <sc <s <script> <script language> <script language=>
+oi