Package org.apache.tools.ant.util

Examples of org.apache.tools.ant.util.FileUtils


    public void testHead() throws IOException {
        executeTarget("testHead");
        File expected = getProject().resolveFile("expected/head-tail.head.test");
        File result = getProject().resolveFile("result/head-tail.head.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testHead: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here


    public void testHeadLines() throws IOException {
        executeTarget("testHeadLines");
        File expected = getProject().resolveFile("expected/head-tail.headLines.test");
        File result = getProject().resolveFile("result/head-tail.headLines.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testHeadLines: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

    public void testHeadSkip() throws IOException {
        executeTarget("testHeadSkip");
        File expected = getProject().resolveFile("expected/head-tail.headSkip.test");
        File result = getProject().resolveFile("result/head-tail.headSkip.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testHeadSkip: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

    public void testHeadLinesSkip() throws IOException {
        executeTarget("testHeadLinesSkip");
        File expected = getProject().resolveFile("expected/head-tail.headLinesSkip.test");
        File result = getProject().resolveFile("result/head-tail.headLinesSkip.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testHeadLinesSkip: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

        executeTarget("testFilterReaderHeadLinesSkip");
        File expected = getProject().resolveFile(
            "expected/head-tail.headLinesSkip.test");
        File result = getProject().resolveFile(
            "result/head-tail.filterReaderHeadLinesSkip.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testFilterReaderHeadLinesSkip: Result not like expected",
                   fu.contentEquals(expected, result));
    }
View Full Code Here

    public void testTail() throws IOException {
        executeTarget("testTail");
        File expected = getProject().resolveFile("expected/head-tail.tail.test");
        File result = getProject().resolveFile("result/head-tail.tail.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testTail: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

    public void testTailLines() throws IOException {
        executeTarget("testTailLines");
        File expected = getProject().resolveFile("expected/head-tail.tailLines.test");
        File result = getProject().resolveFile("result/head-tail.tailLines.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testTailLines: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

    public void testTailSkip() throws IOException {
        executeTarget("testTailSkip");
        File expected = getProject().resolveFile("expected/head-tail.tailSkip.test");
        File result = getProject().resolveFile("result/head-tail.tailSkip.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testTailSkip: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

    public void testTailLinesSkip() throws IOException {
        executeTarget("testTailLinesSkip");
        File expected = getProject().resolveFile("expected/head-tail.tailLinesSkip.test");
        File result = getProject().resolveFile("result/head-tail.tailLinesSkip.test");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue("testTailLinesSkip: Result not like expected", fu.contentEquals(expected, result));
    }
View Full Code Here

        } else {
            //but for big operations, we save all the params to a temp file
            //and set @tmpfile as the command -then we remember to delete the tempfile
            //afterwards
            FileOutputStream fos = null;
            FileUtils fileUtils = FileUtils.newFileUtils();

            temporaryCommandFile = fileUtils.createTempFile("cmd", ".txt", null);
            owner.log("Using response file"+temporaryCommandFile,Project.MSG_VERBOSE);

            try {
                fos = new FileOutputStream(temporaryCommandFile);
                PrintWriter out = new PrintWriter(new BufferedOutputStream(fos));
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.util.FileUtils

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.