From: kpouer Date: Tue, 5 Aug 2003 22:19:32 +0000 (+0000) Subject: a junit Testcase to test the parser X-Git-Url: http://git.phpeclipse.com a junit Testcase to test the parser --- diff --git a/net.sourceforge.phpeclipse/src/test/ParserTester.java b/net.sourceforge.phpeclipse/src/test/ParserTester.java new file mode 100644 index 0000000..e9a4efc --- /dev/null +++ b/net.sourceforge.phpeclipse/src/test/ParserTester.java @@ -0,0 +1,26 @@ +package test; + +import junit.framework.TestCase; + + +/** + * A test for my php parser. + * to use it you have to switch PHPParser.PARSER_DEBUG to true and you can also switch the debugging flag + * of javaCC to true too (you have to regenerate the parser after that) + * Please never remove any test. If you find something that my parser do not handle correctly, + * you can tell me or add a test here. Thanks + * @author Matthieu Casanova + */ +public class ParserTester extends TestCase { + + public void testParser() throws Exception { + PHPParser parser = new PHPParser(); + parser.parseInfo(null,"'; ?>"); + parser.parseInfo(null,""); + parser.parseInfo(null,""); + parser.parseInfo(null,""); + parser.parseInfo(null,""); + parser.parseInfo(null,""); + parser.parseInfo(null,""); + } +}