X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=_src%2FTestByFCBatAuto%2FTestScript%2Ftest%2FCall_and_Log%2FT_Debug.vbs;fp=_src%2FTestByFCBatAuto%2FTestScript%2Ftest%2FCall_and_Log%2FT_Debug.vbs;h=8eca5fb7c61133b691c1f0a13e41958be150e8a3;hb=96594a1f7f4a7fcb1ef2b3641e65c63a0a98635c;hp=0000000000000000000000000000000000000000;hpb=3e01fe561079bc2c636d6486b3e44ec9ab33cbfd;p=vbslib%2Fmain.git diff --git a/_src/TestByFCBatAuto/TestScript/test/Call_and_Log/T_Debug.vbs b/_src/TestByFCBatAuto/TestScript/test/Call_and_Log/T_Debug.vbs new file mode 100644 index 0000000..8eca5fb --- /dev/null +++ b/_src/TestByFCBatAuto/TestScript/test/Call_and_Log/T_Debug.vbs @@ -0,0 +1,37 @@ +Option Explicit +'--- start of vbslib include ------------------------------------------------------ +Dim g_debug, g_vbslib_path, g_IncludeType, g_CommandPrompt, g_fs, g_sh +If IsEmpty( g_fs ) Then + '--- start of parameters for vbslib include ------------------------------- + g_debug = 0 + g_vbslib_path = "vbslib\vbs_inc.vbs" + g_IncludeType = "" + g_CommandPrompt = 2 + '--- end of parameters for vbslib include --------------------------------- + Dim g_f, g_include_path, i : Set g_fs = CreateObject( "Scripting.FileSystemObject" ) + If g_fs.FileExists("setting.vbs") Then Set g_f = g_fs.OpenTextFile( "setting.vbs" ): Execute g_f.ReadAll() + If not IsEmpty( WScript.Arguments.Named.Item("IncludeType") ) Then g_IncludeType = WScript.Arguments.Named.Item("IncludeType") + Set g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory + g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName ) + For i = 10 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For + g_vbslib_path = "..\" + g_vbslib_path : Next + If g_fs.FileExists(g_vbslib_path) Then g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path ) + g_sh.CurrentDirectory = g_f + 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 + Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty + If ResumePush Then On Error Resume Next + main + ResumePop : On Error GoTo 0 +End If +'--- end of vbslib include -------------------------------------------------------- + + +'******************************************************************************** +' <<< [main] >>> +'******************************************************************************** +Sub main() + g_Test.Start + g_Test.Debug "T_Fail_run.vbs", "test_main", "" +End Sub + +