2 '--- start of vbslib include ------------------------------------------------------
\r
3 Dim g_debug, g_vbslib_path, g_IncludeType, g_CommandPrompt, g_fs, g_sh
\r
4 If IsEmpty( g_fs ) Then
\r
5 '--- start of parameters for vbslib include -------------------------------
\r
7 g_vbslib_path = "vbslib\vbs_inc.vbs"
\r
10 '--- end of parameters for vbslib include ---------------------------------
\r
11 Dim g_f, g_include_path, i : Set g_fs = CreateObject( "Scripting.FileSystemObject" )
\r
12 If g_fs.FileExists("setting.vbs") Then Set g_f = g_fs.OpenTextFile( "setting.vbs" ): Execute g_f.ReadAll()
\r
13 If not IsEmpty( WScript.Arguments.Named.Item("IncludeType") ) Then g_IncludeType = WScript.Arguments.Named.Item("IncludeType")
\r
14 Set g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory
\r
15 g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName )
\r
16 For i = 10 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For
\r
17 g_vbslib_path = "..\" + g_vbslib_path : Next
\r
18 If g_fs.FileExists(g_vbslib_path) Then g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path )
\r
19 g_sh.CurrentDirectory = g_f
\r
20 If i=0 Then WScript.Echo "Not found " + g_fs.GetFileName( g_vbslib_path ) +vbCR+vbLF+ "Check g_vbslib_path in " + WScript.ScriptName + " or setting.vbs" : WScript.Quit 1
\r
21 Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty
\r
22 If ResumePush Then On Error Resume Next
\r
24 ResumePop : On Error GoTo 0
\r
26 '--- end of vbslib include --------------------------------------------------------
\r
29 Sub main() : RunTestPrompt Empty : End Sub
\r
32 Sub test_current( tests )
\r
36 Sub test_build( tests )
\r
41 Sub test_setup( tests )
\r
42 If g_fs.FileExists( "T_ALL_4_setup.bat" ) Then RunProg "T_ALL_4_setup.bat", ""
\r
47 Sub test_start( tests )
\r
50 If g_fs.FileExists( "T_ALL_5_do_test.bat" ) Then
\r
51 Dim dbg : If tests.bTargetDebug Then dbg = " //x /debug_main:1" Else dbg = ""
\r
52 RunProg "T_ALL_5_do_test.bat /close" + dbg, ""
\r
55 Set f = g_fs.OpenTextFile( "T_ALL_result.txt" )
\r
56 Do While Trim(f.ReadLine) <> "Test log compare ..." : Loop
\r
57 If Trim(f.ReadLine) <> "Pass." Then Fail
\r
63 Sub test_check( tests )
\r
68 Sub test_clean( tests )
\r
69 If g_fs.FileExists( "T_ALL_7_clean.bat" ) Then RunProg "T_ALL_7_clean.bat", ""
\r