1 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵ | | 1 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵
|
2 | params.add(new CompoundVariable("$2$"));↵ | | 2 | params.add(new CompoundVariable("$1$"));↵
|
3 | params.add(new CompoundVariable("2"));↵ | | 3 | params.add(new CompoundVariable("3"));↵
|
4 | variable.setParameters(params);↵ | | 4 | variable.setParameters(params);↵
|
5 | String match = variable.execute(result, null);↵ | | 5 | String match = variable.execute(result, null);↵
|
6 | assertEquals("5", match);↵ | | 6 | assertEquals("pinposition3", match);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | // Test with output variable name↵ | | 8 | ↵
|
9 | public void testVariableExtraction1a() throws Exception {↵ | | 9 | public void testVariableExtraction5() throws Exception {↵
|
10 | params = new LinkedList();↵ | | 10 | params = new LinkedList();↵
|
11 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵ | | 11 | params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));↵
|
12 | params.add(new CompoundVariable("$2$")); // template↵ | | 12 | params.add(new CompoundVariable("$1$"));↵
|
13 | ↵ | | |
|
14 | params.add(new CompoundVariable("2")); // match number↵ | | 13 | params.add(new CompoundVariable("ALL"));↵
|
15 | ↵ | | |
|
16 | params.add(new CompoundVariable("-")); | | 14 | params.add(new CompoundVariable("_"));
|