Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e01c7b9

Browse files
committed
[Tests] Use revLoadLibrary for loading the "_inputlib" library
1 parent f8b0f05 commit e01c7b9

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

tests/_inputlib.livecodescript

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ for more details.
1616
You should have received a copy of the GNU General Public License
1717
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1818

19+
on revLoadLibrary
20+
insert the script of me into back
21+
end revLoadLibrary
22+
1923
local sTestStrings, sTestNumbers, sTestConversionStrings, sTestFilePaths, sArrayData
2024
local sInitialised
2125

tests/_testrunner.livecodescript

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,14 @@ end invokeTest
172172

173173
-- Add the unit test library stack and the input library to the backscripts
174174
private command invokeLoadLibrary pInfo
175-
-- Compute the filename of the library stack and load it
176-
local tStackname
177-
put invokeGetLibraryStack(pInfo) into tStackFile
178-
put the name of stack tStackFile into tStackName
179-
180-
send "revLoadLibrary" to stack tStackname
181-
182-
-- Use the test input library
183-
start using stack invokeGetInputLibraryStack(pInfo)
175+
local tLibrary, tStackName, tStackFile
176+
repeat for each item tLibrary in "_testlib,_inputlib"
177+
-- Compute the filename of the library stack and load it
178+
put invokeGetStackFolder(pInfo) & slash & tLibrary & ".livecodescript" into tStackFile
179+
put the name of stack tStackFile into tStackName
180+
181+
send "revLoadLibrary" to stack tStackname
182+
end repeat
184183
end invokeLoadLibrary
185184

186185
private function invokeGetStackFolder pInfo
@@ -191,15 +190,6 @@ private function invokeGetStackFolder pInfo
191190
return item 1 to -2 of tFilename
192191
end invokeGetStackFolder
193192

194-
-- Return the filename of the unit test library stack
195-
private function invokeGetLibraryStack pInfo
196-
return invokeGetStackFolder(pInfo) & slash & "_testlib.livecodescript"
197-
end invokeGetLibraryStack
198-
199-
private function invokeGetInputLibraryStack pInfo
200-
return invokeGetStackFolder(pInfo) & slash & "_inputlib.livecodescript"
201-
end invokeGetInputLibraryStack
202-
203193
----------------------------------------------------------------
204194
-- Support for running tests
205195
----------------------------------------------------------------

0 commit comments

Comments
 (0)