Search in sources :

Example 21 with QuotedTokenizer

use of aQute.libg.qtokens.QuotedTokenizer in project bnd by bndtools.

the class TestQuotedTokenizer method testWhiteSpace.

public static void testWhiteSpace() {
    String[] s = new QuotedTokenizer("               1.jar,               2.jar         ", ",").getTokens();
    assertEquals("Length", 2, s.length);
    assertEquals("1.jar", s[0]);
    assertEquals("2.jar", s[1]);
}
Also used : QuotedTokenizer(aQute.libg.qtokens.QuotedTokenizer)

Example 22 with QuotedTokenizer

use of aQute.libg.qtokens.QuotedTokenizer in project bnd by bndtools.

the class TestQuotedTokenizer method testEscapedQuote.

public static void testEscapedQuote() {
    QuotedTokenizer qt = new QuotedTokenizer("'\\'y'", ",");
    String s = qt.nextToken();
    assertEquals("'y", s);
}
Also used : QuotedTokenizer(aQute.libg.qtokens.QuotedTokenizer)

Aggregations

QuotedTokenizer (aQute.libg.qtokens.QuotedTokenizer)22 File (java.io.File)3 ArrayList (java.util.ArrayList)3 Pattern (java.util.regex.Pattern)2 PomFromManifest (aQute.bnd.maven.PomFromManifest)1 Instructions (aQute.bnd.osgi.Instructions)1 CapReqBuilder (aQute.bnd.osgi.resource.CapReqBuilder)1 Description (aQute.lib.getopt.Description)1 FilenameFilter (java.io.FilenameFilter)1 LinkedList (java.util.LinkedList)1 TreeSet (java.util.TreeSet)1 Attributes (java.util.jar.Attributes)1 Name (java.util.jar.Attributes.Name)1 JarInputStream (java.util.jar.JarInputStream)1 Manifest (java.util.jar.Manifest)1 Matcher (java.util.regex.Matcher)1 Requirement (org.osgi.resource.Requirement)1