Package org.apache.xmlgraphics.ps.dsc.events

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCCommentBeginResource


    private String[] toArray(List params) {
        return (String[])params.toArray(new String[params.size()]);
    }
   
    public void testText() throws Exception {
        DSCCommentBeginResource obj = new DSCCommentBeginResource();
        String[] res = toArray(obj.splitParams("procset Test"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Test", res[1]);

        res = toArray(obj.splitParams("procset\tTest"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Test", res[1]);
    }
View Full Code Here


        assertEquals("procset", res[0]);
        assertEquals("Test", res[1]);
    }
   
    public void testParentheseText() throws Exception {
        DSCCommentBeginResource obj = new DSCCommentBeginResource();
        String[] res = toArray(obj.splitParams("procset (Hello World!)"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello World!", res[1]);

        res = toArray(obj.splitParams("procset\t(Hello\t\\\\wonderful/ World!)"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello\t\\wonderful/ World!", res[1]);

        res = toArray(obj.splitParams("procset (Hello \\042wonderful\\042 World!) blahblah"));
        assertEquals(3, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello \"wonderful\" World!", res[1]);
        assertEquals("blahblah", res[2]);

        //Parentheses not balanced
        res = toArray(obj.splitParams("procset (Hello (wonderful) World! blahblah"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello (wonderful) World! blahblah", res[1]);
    }
View Full Code Here

    private String[] toArray(List params) {
        return (String[])params.toArray(new String[params.size()]);
    }

    public void testText() throws Exception {
        DSCCommentBeginResource obj = new DSCCommentBeginResource();
        String[] res = toArray(obj.splitParams("procset Test"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Test", res[1]);

        res = toArray(obj.splitParams("procset\tTest"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Test", res[1]);
    }
View Full Code Here

        assertEquals("procset", res[0]);
        assertEquals("Test", res[1]);
    }

    public void testParentheseText() throws Exception {
        DSCCommentBeginResource obj = new DSCCommentBeginResource();
        String[] res = toArray(obj.splitParams("procset (Hello World!)"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello World!", res[1]);

        res = toArray(obj.splitParams("procset\t(Hello\t\\\\wonderful/ World!)"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello\t\\wonderful/ World!", res[1]);

        res = toArray(obj.splitParams("procset (Hello \\042wonderful\\042 World!) blahblah"));
        assertEquals(3, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello \"wonderful\" World!", res[1]);
        assertEquals("blahblah", res[2]);

        //Parentheses not balanced
        res = toArray(obj.splitParams("procset (Hello (wonderful) World! blahblah"));
        assertEquals(2, res.length);
        assertEquals("procset", res[0]);
        assertEquals("Hello (wonderful) World! blahblah", res[1]);
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.ps.dsc.events.DSCCommentBeginResource

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.