diff --git a/test/alltest.cmd b/test/alltest.cmd
index 5472b97..cfa91a0 100755
--- a/test/alltest.cmd
+++ b/test/alltest.cmd
@@ -1,14 +1,37 @@
-@echo off
+@seetlocal
-REM alltest.cmd - execute all test cases
-REM
-REM (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
-REM See tidy.c for the copyright notice.
-REM
-REM
-REM
+@REM alltest.cmd - execute all test cases
+@REM
+@REM (c) 1998-2014 (W3C) MIT, ERCIM, Keio University
+@REM See include/tidy.h for the copyright notice.
+@REM
+@REM
+@REM
-REM (for MS compiler users):
-REM call alltest1 ..\build\msvc\Release\tidy.exe .\tmp
+@REM ########################################################
+@REM ### *** SET LOCATION OF TIDY EXE TO USE FOR TEST *** ###
+@REM ### (for MS compiler users) ###
+@REM ########################################################
+@REM call alltest1 ..\build\msvc\Release\tidy.exe .\tmp
+@REM call alltest1 ..\bin\tidy.exe .\tmp
+@REM ########################################################################
+@REM This is the location of the cmake build output using the MSVC Generator
+@set TMPEXE=..\build\cmake\Release\tidy5.exe
+@REM === some other test EXE I can use for compare ===
+@REM set TMPEXE=C:\Projects\tidy\tidy-cvs\build\msvc\Release\tidy.exe
+@REM set TMPEXE=C:\MDOS\tidydev.exe
+@REM ########################################################################
+@if NOT EXIST %TMPEXE% goto NOEXE
-call alltest1 ..\bin\tidy.exe .\tmp
+@set TMPTEST=temptests.txt
+@if EXIST %TMPTEST% @del %TMPTEST%
+
+@call alltest1 %TMPEXE% temp-5
+
+@goto END
+
+:NOEXE
+@echo.
+@echo Error: Can NOT locate %TMPEXE%! Has it been built?
+@echo *** FIX ME *** setting the location of the EXE to use for the test
+:END
diff --git a/test/alltest1.cmd b/test/alltest1.cmd
index 829afa1..100a259 100755
--- a/test/alltest1.cmd
+++ b/test/alltest1.cmd
@@ -1,3 +1,4 @@
+@setlocal
@echo off
REM alltest1.cmd - execute all test cases
diff --git a/test/onetest.cmd b/test/onetest.cmd
index 5700766..7209a5e 100755
--- a/test/onetest.cmd
+++ b/test/onetest.cmd
@@ -1,5 +1,5 @@
@echo off
-
+@set TMPTEST=temptest.txt
REM onetest.cmd - execute a single test case
REM
REM (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
@@ -40,15 +40,19 @@ if exist %TIDYFILE% del %TIDYFILE%
@REM Noisy output, or quiet
@REM echo Testing %1 input %INFILE% config %CFGFILE% ...
-echo Testing %1
+@echo Testing %1, expect %EXPECTED%
+@echo Testing %1, expect %EXPECTED% >> %TMPTEST%
+@echo Doing: '%TIDY% -f %MSGFILE% -config %CFGFILE% %3 %4 %5 %6 %7 %8 %9 --tidy-mark no -o %TIDYFILE% %INFILE% >> %TMPTEST%
-%TIDY% -f %MSGFILE% -config %CFGFILE% %3 %4 %5 %6 %7 %8 %9 --tidy-mark no -o %TIDYFILE% %INFILE%
-set STATUS=%ERRORLEVEL%
+@%TIDY% -f %MSGFILE% -config %CFGFILE% %3 %4 %5 %6 %7 %8 %9 --tidy-mark no -o %TIDYFILE% %INFILE%
+@set STATUS=%ERRORLEVEL%
-if %STATUS% EQU %EXPECTED% goto done
-set ERRTESTS=%ERRTESTS% %TESTNO%
-echo *** Failed - got %STATUS%, expected %EXPECTED% ***
-type %MSGFILE%
+@if %STATUS% EQU %EXPECTED% goto done
+@set ERRTESTS=%ERRTESTS% %TESTNO%
+@echo *** Failed - got %STATUS%, expected %EXPECTED% ***
+@type %MSGFILE%
+@echo *** Failed - got %STATUS%, expected %EXPECTED% *** >> %TMPTEST%
+@type %MSGFILE% >> %TMPTEST%
goto done
:Err1
@@ -82,8 +86,9 @@ goto done
@goto TRYAT
:TRYAT
-@echo Try running alltest.cmd ..\build\msvc\Release\Tidy.exe tmp ...
+@echo Try running alltest1.cmd ..\build\cmake\Release\Tidy5.exe tmp
@echo ==============================================================
+@pause
@goto done
:Err6