You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 line
1.3KB

  1. Option Explicit
  2. Dim fso
  3. Dim testsDir
  4. Dim repoRoot
  5. Dim coreDir
  6. Dim bootStream
  7. Dim frameworkCode
  8. Set fso = CreateObject("Scripting.FileSystemObject")
  9. testsDir = fso.GetParentFolderName(WScript.ScriptFullName) & "\"
  10. repoRoot = fso.GetParentFolderName(Left(testsDir, Len(testsDir) - 1)) & "\"
  11. coreDir = repoRoot & "Core\"
  12. ' Bootstrap: load the framework/fakes before any helper it defines (like
  13. ' IncludeAspClass) exists to be called.
  14. Set bootStream = fso.OpenTextFile(testsDir & "TestSupport.vbs", 1)
  15. frameworkCode = bootStream.ReadAll
  16. bootStream.Close
  17. ExecuteGlobal frameworkCode
  18. ' --- Core classes (ASP files - strip <% %> before executing) ---
  19. IncludeAspClass coreDir & "App.asp"
  20. IncludeAspClass coreDir & "Router.asp"
  21. IncludeAspClass coreDir & "HttpRequest.asp"
  22. IncludeAspClass coreDir & "ClockService.asp"
  23. IncludeAspClass coreDir & "Controllers\HomeController.asp"
  24. IncludeAspClass coreDir & "Controllers\GreetController.asp"
  25. IncludeAspClass coreDir & "Controllers\NotFoundController.asp"
  26. IncludeAspClass coreDir & "Dispatcher.asp"
  27. ' --- Test suites ---
  28. IncludeVbsFile testsDir & "RouterTests.vbs"
  29. IncludeVbsFile testsDir & "AppTests.vbs"
  30. IncludeVbsFile testsDir & "HttpRequestTests.vbs"
  31. IncludeVbsFile testsDir & "ControllerTests.vbs"
  32. IncludeVbsFile testsDir & "DispatcherTests.vbs"
  33. PrintSummary
  34. If HasFailures() Then
  35. WScript.Quit 1
  36. Else
  37. WScript.Quit 0
  38. End If

Powered by TurnKey Linux.