Commit 531a441b authored by's avatar
Browse files

Add a (currently very permissive) test name check

We now get a framework failure if a test name doesn't match
parent d22658b7
......@@ -645,6 +645,8 @@ def test (name, setup, func, args):
global allTestNames
if name in allTestNames:
framework_fail(name, 'duplicate', 'There are multiple tests with this name')
if not re.match('^[a-zA-Z0-9][a-zA-Z0-9._/-]*$', name):
framework_fail(name, 'bad_name', 'This test has an invalid name')
myTestOpts = copy.copy(thisdir_testopts)
if type(setup) is types.ListType:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment