From 82e117fadd34dd76d9ab419943719bbb100f2ba1 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 15 Dec 2014 14:37:22 -0500 Subject: [PATCH] Add code_file example tool from Bjoern. --- test/functional/tools/code_file.py | 14 ++++++++++++++ test/functional/tools/code_file.xml | 15 +++++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + 3 files changed, 30 insertions(+) create mode 100644 test/functional/tools/code_file.py create mode 100644 test/functional/tools/code_file.xml diff --git a/test/functional/tools/code_file.py b/test/functional/tools/code_file.py new file mode 100644 index 00000000000..5425523e035 --- /dev/null +++ b/test/functional/tools/code_file.py @@ -0,0 +1,14 @@ + + +from galaxy.tools.parameters import DataToolParameter + + + +def validate_input( trans, error_map, param_values, page_param_map ): + """ + Validates the user input, before execution. + """ + first = param_values['name1'] + second = param_values['name2'] + if first == second: + error_map['name1'] = "The value names should be different." diff --git a/test/functional/tools/code_file.xml b/test/functional/tools/code_file.xml new file mode 100644 index 00000000000..9bf5a7b71b7 --- /dev/null +++ b/test/functional/tools/code_file.xml @@ -0,0 +1,15 @@ + + code_file + + cat $input1 > $output + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index 4b3a1a6a597..9c35b4a5eee 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -3,6 +3,7 @@ +