+"b2 = a${b0}b\n"
+"b3 = a ${b0} b\n"
+"b4 = $<b0>${b0}\n"
;
PropertySet ps = new PropertySet();
ps.parse(data1);
assertEquals( "\"", ""+ps.get("q1") );
assertEquals( "\"\"", ""+ps.get("q2") );
assertEquals( "a", ""+ps.get("q3") );
assertEquals( " a ", ""+ps.get("q4") );
assertEquals( "\"", ""+ps.get("q5") );
assertEquals( "true", ""+ps.has("foo") );
assertEquals( "false", ""+ps.has("red") );
assertEquals( "true", ""+ps.isYes("good") );
assertEquals( "false", ""+ps.isNo("good") );
assertEquals( "true", ""+ps.isNo("evil") );
assertEquals( "bar", ""+ps.get("foo") );
assertEquals( "", ""+ps.get("red") );
assertEquals( "s1", ps.get("s1") );
assertEquals( "as1b", ps.get("s2") );
assertEquals( "s1b", ps.get("s3") );
assertEquals( "as1", ps.get("s4") );
assertEquals( "s1", ps.get("s5") );
assertEquals( "$<s7>", ps.get("s6") );
assertEquals( "$<s6>", ps.get("s7") );
assertEquals( "s8", ps.get("s8") );
assertEquals( "s1 s8", ps.get("s9") );
assertEquals( "[$<nothing>]", ps.get("s10") );
assertEquals( "s1s1", ps.get("s11") );
assertEquals( "\\[", ps.get("s12") );
assertEquals( "\\\\[", ps.get("s13") );
assertEquals( "[", ps.get("s14") );
assertEquals( " a ", ps.get("s15") );
assertEquals( "a", ps.get("s16") );
assertEquals( "[", ps.get("s17") );
assertEquals( "$<s18>a", ps.get("s18") );
assertEquals( "a$<s19>bbarc$<s19>d$<s18>a", ps.get("s19") );
assertEquals( "0", ""+ps.getList("l0",",").length );
assertEquals( "1", ""+ps.getList("l1",",")[0] );
assertEquals( "1", ""+ps.getList("l2",",")[0] );
assertEquals( "1", ""+ps.getList("l3",",")[0] );
assertEquals( "2", ""+ps.getList("l3",",")[1] );
assertEquals( "1", ""+ps.getList("l4",",")[0] );
assertEquals( "2", ""+ps.getList("l4",",")[1] );
assertEquals( "0", ""+ps.getList("l5",",").length );
assertEquals( "1", ""+ps.getList("l6",",")[0] );
assertEquals( "1", ""+ps.getList("l7",",")[0] );
assertEquals( "1", ""+ps.getList("l8",",")[0] );
assertEquals( "2", ""+ps.getList("l8",",")[1] );
assertEquals( "1", ""+ps.getList("l9",",")[0] );
assertEquals( "3", ""+ps.getList("l9",",")[1] );
String data2 =
"foo=newfoo\n"
+"red=blue";
PropertySet ps2 = new PropertySet();
ps2.parse( data2 );
ps.overrideWith( ps2 );
assertEquals( "newfoo", ""+ps.get("foo") );
assertEquals( "blue", ""+ps.get("red") );
assertEquals( "black", ""+ps.get("white") );