Examples of TestIndentPrefs


Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        assertEquals("\n              ", docCmd.text);

    }

    public void testNoAutoIndentClosingPar2() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "newTuple = (\n" +
                "              what(),\n" +
                "\n" + //pressing tab in the start of this line will bring us to the 'what()' level.
                "            )\n" +
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        assertEquals("              ", docCmd.text);

    }

    public void testNewLineAfterLineWithComment() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "string1 = '01234546789[#]'" +
                "";
        final Document doc = new Document(str);
        DocCmd docCmd = new DocCmd(doc.getLength(), 0, "\n");
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        assertEquals("\n", docCmd.text);

    }

    public void testNewLine10() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "def M1(a):\n" +
                "    doFoo(a,b(),\n" +
                "          '',b)" +
                "";
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        assertEquals("\n    ", docCmd.text);

    }

    public void testNewLine11() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "def fun():\n" +
                "    if True:\n" +
                "        passif False: 'foo'" +
                "";
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        assertEquals("\n    ", docCmd.text);

    }

    public void testNewLine12() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "if False:print 'done'" +
                "";
        final Document doc = new Document(str);
        DocCmd docCmd = new DocCmd(doc.getLength() - "print 'done'".length(), 0, "\n");
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        strategy.customizeDocumentCommand(doc, docCmd);
        assertEquals("\n    ", docCmd.text);
    }

    public void testNewLine3() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "for a in b:    " +
                "";
        final Document doc = new Document(str);
        DocCmd docCmd = new DocCmd(doc.getLength() - 4, 0, "\n");
        strategy.customizeDocumentCommand(doc, docCmd);
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        String expected = "for a in b:    ";
        assertEquals(expected, doc.get());
    }

    public void testNewLine6() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "for v in w:\n" +
                "    pass\n" + //dedent on pass
                "";
        final Document doc = new Document(str);
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        strategy.customizeDocumentCommand(doc, docCmd);
        assertEquals("\n", docCmd.text);
    }

    public void testNewLine6a() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "def getSpilledComps( *dummy ):\n" +
                "    return [self.component4]" + //dedent here
                "";
        final Document doc = new Document(str);
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        strategy.customizeDocumentCommand(doc, docCmd);
        assertEquals("\n", docCmd.text);
    }

    public void testNewLine7() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "class C:\n" +
                "    a = 30\n" +
                "print C.a\n" +
                "\n" +
View Full Code Here

Examples of org.python.pydev.editor.autoedit.TestIndentPrefs

        strategy.customizeDocumentCommand(doc, docCmd);
        assertEquals("\n", docCmd.text);
    }

    public void testNewLine8() {
        strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
        String str = "" +
                "class C:\n" +
                "    pass\n" +
                "    a = 30\n" +
                "    " +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.