Files
John ChiltonandClaude Opus 5.5 b5d29ee639 Test value_json null and [] on select framework tools
Covers the documented forms for unset optional selects and empty
multiple selects, optional and required.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 08:11:46 -04:00

44 lines
1.4 KiB
XML

<tool id="gx_select_multiple" name="gx_select_multiple" version="1.0.0">
<command><![CDATA[
echo '$parameter' >> '$output'
]]></command>
<inputs>
<param name="parameter" type="select" multiple="true">
<option value="--ex1">Ex1</option>
<option value="ex2">Ex2</option>
<option value="--ex3">Ex3</option>
<option value="--ex4">Ex4</option>
<option value="ex5">Ex5</option>
</param>
</inputs>
<outputs>
<data name="output" format="txt" />
</outputs>
<tests>
<test>
<param name="parameter" value="ex2" />
<output name="output">
<assert_contents>
<has_line line="ex2" />
</assert_contents>
</output>
</test>
<test>
<!-- these parameters are not implicitly optional and don't select top option -->
<output name="output">
<assert_contents>
<has_line line="None" />
</assert_contents>
</output>
</test>
<test>
<param name="parameter" value_json="[]" />
<output name="output">
<assert_contents>
<has_line line="None" />
</assert_contents>
</output>
</test>
</tests>
</tool>