/
validation_repeat.xml
57 lines (57 loc) · 1.47 KB
/
validation_repeat.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<tool id="validation_repeat" name="Validation (default)">
<command>
#for $r in $r1
echo "${r.text}" >> out1;
#end for
#for $r in $r2
echo "${r.text}" >> out2;
#end for
</command>
<inputs>
<repeat name="r1" label="Repeat 1">
<param name="text" type="text" label="text input" />
</repeat>
<repeat name="r2" label="Repeat 2">
<param name="text" type="text" label="text input">
<validator type="empty_field" />
<sanitizer>
<valid initial="none">
<add value="a"/>
<add value="b"/>
<add value="d"/>
<add value="e"/>
</valid>
<mapping initial="none">
<add source="@" target="c"/>
</mapping>
</sanitizer>
</param>
</repeat>
</inputs>
<outputs>
<data name="out_file1" from_work_dir="out1" />
<data name="out_file2" from_work_dir="out2" />
</outputs>
<tests>
<test>
<repeat name="r1">
<param name="text" value="" ; echo "moo" />
</repeat>
<repeat name="r2">
<param name="text" value="ab@de" />
</repeat>
<output name="out_file1">
<assert_contents>
<has_line line="__dq__ X echo __dq__moo" />
</assert_contents>
</output>
<output name="out_file2">
<assert_contents>
<has_line line="abcde" />
</assert_contents>
</output>
</test>
</tests>
<help>
</help>
</tool>