Package org.epic.perl.editor.test

Examples of org.epic.perl.editor.test.Log


    {
        String line =
            "Subroutine foo redefined at /blah/X.pm line 65." +
            " at /foo/Bar.pm line 22.";
        PerlValidatorBase.ParsedErrorLine pline =
            new PerlValidatorBase.ParsedErrorLine(line, new Log());
       
        assertEquals(
            "Subroutine foo redefined at /blah/X.pm line 65.",
            pline.getMessage());
        assertEquals(22, pline.getLineNumber());
       
        // test case for bug #1307071
        line = "syntax error at bug1307071.pl line 9, near \"if {\"";
        pline = new PerlValidatorBase.ParsedErrorLine(line, new Log());
        assertEquals("syntax error", pline.getMessage()); // could be better...
        assertEquals(9, pline.getLineNumber());
    }
View Full Code Here


    }
   
    private void _testFile(String inFile, String outFile) throws IOException
    {
        Document doc = new Document(readFile(inFile));
        new PerlPartitioner(new Log(), doc);

        String expected = readFile(outFile);

        SourceFile src = new SourceFile(new Log(), doc);
        src.parse();
       
        StringBuffer buf = new StringBuffer();
        for (Iterator i = src.getPackages().iterator(); i.hasNext();)
        {
View Full Code Here

{
    // this test expects unix newlines
    public void testSyntax() throws Exception
    {
        Document doc = new Document(readFile("workspace/EPICTest/syntax.pl").replace("\r",""));
        PerlPartitioner partitioner = new PerlPartitioner(new Log(), doc);

        ITypedRegion[] partitioning =
            partitioner.computePartitioning(0, doc.getLength());
       
        StringBuffer buf = new StringBuffer();
View Full Code Here

    }

    private SourceFile loadSourceFile(String file) throws Exception
    {
        Document doc = new Document(readFile(file));
        new PerlPartitioner(new Log(), doc);

        return new SourceFile(getLoggerForTests(), doc);
    }
View Full Code Here

        };
    }

    public PerlValidatorStub()
    {
        super(new Log(), perlExecutor);
    }
View Full Code Here

TOP

Related Classes of org.epic.perl.editor.test.Log

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.