diff --git a/lib/galaxy/tool_util/verify/asserts/text.py b/lib/galaxy/tool_util/verify/asserts/text.py
index 74b7d741215..a82568f63c7 100644
--- a/lib/galaxy/tool_util/verify/asserts/text.py
+++ b/lib/galaxy/tool_util/verify/asserts/text.py
@@ -20,6 +20,12 @@ def assert_has_line(output, line):
assert match is not None, "No line of output file was '%s' (output was '%s') " % (line, output)
+def assert_has_n_lines(output, n):
+ """Asserts the specified output contains ``n`` lines."""
+ n_lines_found = len(output.splitlines())
+ assert n_lines_found == int(n), "Expected %s lines in output, found %s lines" % (n, n_lines_found)
+
+
def assert_has_text_matching(output, expression):
""" Asserts the specified output contains text matching the
regular expression specified by the argument expression."""
diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd
index 7dc2cf01deb..bf3c575eb85 100644
--- a/lib/galaxy/tool_util/xsd/galaxy.xsd
+++ b/lib/galaxy/tool_util/xsd/galaxy.xsd
@@ -785,6 +785,7 @@ specified and instead a series of assertions is made about the output.
+
@@ -1671,6 +1672,12 @@ module.
+
+
+ ``.]]>
+
+
+
``).]]>
diff --git a/test/functional/tools/validation_default.xml b/test/functional/tools/validation_default.xml
index 0aba8077931..a043679f599 100644
--- a/test/functional/tools/validation_default.xml
+++ b/test/functional/tools/validation_default.xml
@@ -1,6 +1,6 @@
-
+
- echo "$input1" > out1;
+ echo '$input1' > out1;
echo $float_param > out2;
echo $select_param > out3;
@@ -25,6 +25,7 @@