run-tests: restrict the test cases allowed characters

Authored by lothiraldan.

Description

run-tests: restrict the test cases allowed characters

Most test cases in core and in extension only use A-Za-z0-9- but a few tests
in extensions also have a . in their test cases names. Also add a _ to
allow all kind of case naming format.

Differential Revision: https://phab.mercurial-scm.org/D3721