--- /dev/null
+package org.plog4u.wiki.test.filter;
+
+import java.io.File;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.plog4u.wiki.filter.WikipediaFilter;
+
+
+public class DefinitionListFilterTest extends FilterTestSupport {
+ public DefinitionListFilterTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ filter = new WikipediaFilter();
+ super.setUp();
+ }
+
+ public static Test suite() {
+ return new TestSuite(DefinitionListFilterTest.class);
+ }
+
+ public void testDefinitionList1() {
+ assertEquals("<dl><dt> term </dt><dd> definition"+NEWLINE + "</dd><dt> term 2 </dt><dd> definition 2"+NEWLINE
+ + "</dd><dd> definition without term"+NEWLINE + "</dd></dl>", filter.filter("; term : definition"+NEWLINE
+ + "; term 2 : definition 2"+NEWLINE + ": definition without term", context));
+ }
+
+ public void testDefinitionList2() {
+ assertEquals("<dl><dt>term 2:definition 2"+NEWLINE + "</dt></dl>"+NEWLINE + "<dl><dd> definition 2"+NEWLINE + "</dd></dl>", filter.filter(
+ ";term 2:definition 2"+NEWLINE +NEWLINE + ": definition 2", context));
+ }
+
+}
\ No newline at end of file
*/
public class FilterTestSupport extends TestCase {
+ public static final String WINDOWS_NEWLINE = "\r\n";
+ public static final String UNIX_NEWLINE = "\n";
+ public static final String NEWLINE = WINDOWS_NEWLINE;
protected Filter filter;
protected FilterContext context;