normalInput = "\"test\\\\\",test"; normalOutput = new String[][]{{"test\\", "test"}}; shredder = new CSVParser(new StringReader(normalInput)); compare("backslash at end of quoted", normalOutput, shredder.getAllValues());
	public static void main (String[] args) throws IOException{		File f = new File("CSVTest.txt");		FileOutputStream out = new FileOutputStream(f);		CSVPrinter csvOut = new CSVPrinter(out, '#');		csvOut.printlnComment("Comma Separated Value Test");		csvOut.println();		csvOut.printlnComment("Five Cities");		csvOut.println(new String[] {			"Boston",			"San Francisco",			"New York",			"Chicago",			"Houston",		});		csvOut.println();		csvOut.println(""); // an empty value on a line by itself.		csvOut.println(new String[] {			"Two\nTokens",			"On the\nSame Line"		});		csvOut.printlnComment("A two line comment\njust to see that it works");		CSVParser shredder = new CSVParser(new StraightStreamReader(new FileInputStream(f)));		shredder.setCommentStart("#;!");		shredder.setEscapes("nrtf", "\n\r\t\f");		String t;		while ((t = shredder.nextValue()) != null) {			if (t.length() == 1){				System.out.println("" + shredder.lastLineNumber() + " " + (int)(t.charAt(0)));			} else {				System.out.println("" + shredder.lastLineNumber() + " " + t);			}		}		try {			String normalInput = ",\"a\",\",\t'\\\"\"";			String[][] normalOutput = new String[][]{{"", "a", ",\t'\""}};			shredder = new CSVParser(new StringReader(normalInput));			compare("normal", normalOutput, shredder.getAllValues());			String tabInput = "\t\"a\"\t\",\t'\\\"\"";			shredder = new CSVParser(new StringReader(tabInput));			shredder.changeDelimiter('\t');			compare("tabs", normalOutput, shredder.getAllValues());			String aposInput = ",'a',',\t\\'\"'";			shredder = new CSVParser(new StringReader(aposInput));			shredder.changeQuote('\'');			compare("apostrophes", normalOutput, shredder.getAllValues());			String swappedInput = "\",a,\",\\,\t'\\\",";			shredder = new CSVParser(new StringReader(swappedInput));			shredder.changeDelimiter('\t');			shredder.changeQuote(',');			shredder.changeDelimiter('"');			compare("commas and quotes swapped", normalOutput, shredder.getAllValues());		} catch (Exception x){			System.err.println(x.getMessage());			System.exit(1);		}	}