⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpleexerunnertest.java

📁 Python Development Environment (Python IDE plugin for Eclipse). Features editor, code completion, re
💻 JAVA
字号:
/*
 * Created on Jun 25, 2006
 * @author Fabio
 */
package org.python.pydev.runners;

import java.util.ArrayList;
import java.util.List;

import org.python.pydev.core.TestDependent;
import org.python.pydev.core.Tuple;
import org.python.pydev.editor.codecompletion.revisited.CodeCompletionTestsBase;

/**
 * Extends CodeCompletionTestsBase so that we have the bundle set for getting the environment.
 */
public class SimpleExeRunnerTest extends CodeCompletionTestsBase{

    protected void setUp() throws Exception {
        super.setUp();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }
    
    public void testIt() throws Exception {
        if(TestDependent.HAS_CYGWIN){
            SimpleExeRunner runner = new SimpleExeRunner();
            Tuple<String, String> tup = runner.runAndGetOutput(TestDependent.CYGWIN_CYGPATH_LOCATION, new String[]{TestDependent.CYGWIN_CYGPATH_LOCATION}, null);
            assertEquals(TestDependent.CYGWIN_UNIX_CYGPATH_LOCATION, tup.o1.trim());
            assertEquals("", tup.o2);
        }
    }
    
    public void testIt2() throws Exception {
    	if(TestDependent.HAS_CYGWIN){
	        SimpleExeRunner runner = new SimpleExeRunner();
	        List<String> ret = runner.convertToCygwinPath(TestDependent.CYGWIN_CYGPATH_LOCATION, TestDependent.CYGWIN_CYGPATH_LOCATION, "c:\\foo");
	        assertEquals(2, ret.size());
	        ArrayList<String> expected = new ArrayList<String>();
	        expected.add(TestDependent.CYGWIN_UNIX_CYGPATH_LOCATION);
	        expected.add("/cygdrive/c/foo");
	        assertEquals(expected, ret);
    	}
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -