315c383a4d
[GB.TEST] * OPT: gb.test: Run test suite by name from settings
23 lines
616 B
Text
23 lines
616 B
Text
' Gambas module file
|
|
|
|
''' Helper functions for Test class (that need to be tested but should not be exported)
|
|
|
|
'' fiddle out testsuite's tests out of .test file
|
|
Public Function GetTestSuiteByName(Name As String) As String
|
|
|
|
Dim Set As New Settings(Application.Path &/ ".test")
|
|
Dim sKey As String
|
|
|
|
If Name Begins "@" Then
|
|
Name = Right(Name, String.Len(Name) - 1)
|
|
Endif
|
|
|
|
For Each sKey In Set.Keys
|
|
If Set[sKey &/ "Name"] = Name Then
|
|
Return Set[sKey &/ "Tests"]
|
|
Endif
|
|
Next
|
|
|
|
Error.Raise(Subst(("Could not find a test suite with the name '&1'."), Name))
|
|
|
|
End
|