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("$2$"));↵
|
3 | params.add(new CompoundVariable(".333"));↵ | | 3 | params.add(new CompoundVariable("2"));↵
|
4 | variable.setParameters(params);↵ | | 4 | variable.setParameters(params);↵
|
5 | String match = variable.execute(result, null);↵ | | 5 | String match = variable.execute(result, null);↵
|
6 | assertEquals("1, ", match);↵ | | 6 | assertEquals("5", match);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public void testDefaultValue↵ | | 8 | // Test with output variable name↵
|
9 | () throws Exception {↵ | | 9 | public void testVariableExtraction1a() 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$, "));↵ | | 12 | params.add(new CompoundVariable("$2$"));↵
|
13 | ↵ | | 13 | // template↵
|
14 | params.add(new CompoundVariable(".333"));↵ | | 14 | params.add(new CompoundVariable("↵
|
15 | ↵ | | 15 | 2")); // match number↵
|
16 | params.add(new CompoundVariable("")) | | 16 | params.add(new CompoundVariable("-"))
|