Index of a test file name: N for test<N>.txt where N is a positive integer, otherwise null. This is the one rule for "is this a test file", so stray files such as test1.txt.bak, test_notes.txt or test0.txt are never treated as tests.
N
test<N>.txt
null
test1.txt.bak
test_notes.txt
test0.txt
File name (not a path)
The test index, or null if the name is not a test
testFileIndex('test12.txt'); // 12testFileIndex('test1.txt.bak'); // null Copy
testFileIndex('test12.txt'); // 12testFileIndex('test1.txt.bak'); // null
Index of a test file name:
Nfortest<N>.txtwhereNis a positive integer, otherwisenull. This is the one rule for "is this a test file", so stray files such astest1.txt.bak,test_notes.txtortest0.txtare never treated as tests.