01: package test.net.sourceforge.pmd.jaxen;
02:
03: import net.sourceforge.pmd.Rule;
04: import net.sourceforge.pmd.rules.XPathRule;
05:
06: import org.junit.Test;
07:
08: import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
09:
10: public class RegexpAcceptanceTest extends SimpleAggregatorTst {
11:
12: @Test
13: public void testSimple() throws Throwable {
14: Rule r = new XPathRule();
15: r
16: .addProperty("xpath",
17: "//ClassOrInterfaceDeclaration[matches(@Image, 'F?o')]");
18: r.setMessage("");
19: runTests(r, "RegexpAcceptance");
20: }
21:
22: public static junit.framework.Test suite() {
23: return new junit.framework.JUnit4TestAdapter(
24: RegexpAcceptanceTest.class);
25: }
26: }
|