mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'release_22.01' into release_22.05
This commit is contained in:
@@ -4171,7 +4171,7 @@ used to generate dynamic options.
|
||||
</xs:attribute>
|
||||
<xs:attribute name="startswith" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation xml:lang="en">Ignore lines starting with the given string.</xs:documentation>
|
||||
<xs:documentation xml:lang="en">Keep only lines starting with the given string.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="meta_file_key" type="xs:string">
|
||||
|
||||
@@ -655,7 +655,7 @@ class DynamicOptions:
|
||||
rval = []
|
||||
field_count = None
|
||||
for line in reader:
|
||||
if line.startswith("#") or (self.line_startswith and line.startswith(self.line_startswith)):
|
||||
if line.startswith("#") or (self.line_startswith and not line.startswith(self.line_startswith)):
|
||||
continue
|
||||
line = line.rstrip("\n\r")
|
||||
if line:
|
||||
|
||||
@@ -6,7 +6,7 @@ echo select_single '$select_single' > '$output'
|
||||
<inputs>
|
||||
<param name="single" type="data" format="csv" label="single"/>
|
||||
<param name="select_single" type="select" label="select_single">
|
||||
<options from_dataset="single" separator="," startswith="Transaction_date">
|
||||
<options from_dataset="single" separator="," startswith="1/3/09">
|
||||
<column name="name" index="1"/>
|
||||
<column name="value" index="2"/>
|
||||
<validator type="no_options" message="No data is available in single" />
|
||||
@@ -29,11 +29,15 @@ echo select_single '$select_single' > '$output'
|
||||
</assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
<!-- test that data from "comment" lines can not be selected, i.e. if the startswith attribute of <options> works-->
|
||||
<!-- test that only data from lines starting with "1/2/09" can be selected, i.e. if the startswith attribute of <options> works-->
|
||||
<test expect_failure="true">
|
||||
<param name="single" value="1.csv" />
|
||||
<param name="select_single" value="Product" />
|
||||
</test>
|
||||
<test expect_failure="true">
|
||||
<param name="single" value="1.csv" />
|
||||
<param name="select_single" value="Product2" />
|
||||
</test>
|
||||
</tests>
|
||||
<help>
|
||||
</help>
|
||||
|
||||
Reference in New Issue
Block a user