1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/W/test_exe.bat

86 lines
2.9 KiB
Batchfile
Raw Normal View History

2018-05-07 16:04:23 +02:00
REM $Id: test_exe.bat,v 1.21 2018/02/12 21:51:56 gilles Exp gilles $
2011-03-12 03:44:59 +01:00
2016-09-19 17:17:24 +02:00
@SETLOCAL
@ECHO OFF
ECHO Currently running through %0 %*
2011-03-12 03:44:59 +01:00
2016-09-19 17:17:24 +02:00
cd /D %~dp0
2011-03-12 03:44:59 +01:00
2018-05-07 16:04:23 +02:00
@REM Remove the error file because its existence means an error occurred during this script execution
2016-09-19 17:17:24 +02:00
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
2018-05-07 16:04:23 +02:00
CALL :handle_bad_success .\imapsync.exe --thisoptionnoexists
2016-09-19 17:17:24 +02:00
CALL :handle_error .\imapsync.exe --tests
2017-09-23 23:54:48 +02:00
CALL :handle_error .\imapsync.exe --testslive --nossl2
2018-05-07 16:04:23 +02:00
CALL :handle_bad_success CALL :launch_imapsync --folder """INBOX.blanc middle""" --f1f2 """INBOX.blanc middle=INBOX.blanc middle""" --dry
CALL :handle_error CALL :launch_imapsync --folder "INBOX.blanc middle" --f1f2 "INBOX.blanc middle=INBOX.blanc middle" --dry
2017-09-23 23:54:48 +02:00
@REM CALL :handle_error .\imapsync.exe --testslive6 --nossl2
2018-05-07 16:04:23 +02:00
@REM EXIT /B
2014-05-30 03:56:21 +02:00
@ECHO ==== All 8 combinaisons between ssl1/tls1 ssl2/tls2 justconnect/justlogin
2016-09-19 17:17:24 +02:00
CALL :handle_error CALL :launch_imapsync --justconnect --ssl1 --ssl2
CALL :handle_error CALL :launch_imapsync --justconnect --tls1 --tls2
CALL :handle_error CALL :launch_imapsync --justconnect --ssl1 --tls2
CALL :handle_error CALL :launch_imapsync --justconnect --tls1 --ssl2
CALL :handle_error CALL :launch_imapsync --justlogin --ssl1 --ssl2
CALL :handle_error CALL :launch_imapsync --justlogin --tls1 --tls2
CALL :handle_error CALL :launch_imapsync --justlogin --ssl1 --tls2
CALL :handle_error CALL :launch_imapsync --justlogin --tls1 --ssl2
@ECHO ==== various calls
2018-05-07 16:04:23 +02:00
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl1_SSL_version SSLv23 --justconnect
CALL :handle_error CALL :launch_imapsync --ssl1 --sslargs1 SSL_version=SSLv23 --sslargs1 SSL_verify_mode=0 --justlogin
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl1_SSL_version SSLv23 --justconnect
CALL :handle_error CALL :launch_imapsync --ssl1 --sslargs1 SSL_version=SSLv23 --sslargs1 SSL_verify_mode=0 --justlogin
2016-09-19 17:17:24 +02:00
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl2 --delete2
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl2 --delete2 --folder INBOX
CALL :handle_error CALL :launch_imapsync --ssl1 --ssl2 --delete2 --folder INBOX --usecache
ENDLOCAL
EXIT /B
:handle_error
SETLOCAL
ECHO IN %0 %*
%*
SET CMD_RETURN=%ERRORLEVEL%
ECHO CMD_RETURN=%CMD_RETURN%
IF %CMD_RETURN% EQU 0 (
ECHO GOOD END
) ELSE (
ECHO BAD END
IF NOT EXIST LOG_bat MKDIR LOG_bat
ECHO Failure calling %* >> LOG_bat\%~nx0.txt
)
ENDLOCAL
EXIT /B
2018-05-07 16:04:23 +02:00
:handle_bad_success
SETLOCAL
ECHO IN %0 %*
%*
SET CMD_RETURN=%ERRORLEVEL%
ECHO CMD_RETURN=%CMD_RETURN%
IF %CMD_RETURN% NEQ 0 (
ECHO GOOD BAD END
) ELSE (
ECHO BAD GOOD END
IF NOT EXIST LOG_bat MKDIR LOG_bat
ECHO No failure calling %* >> LOG_bat\%~nx0.txt
)
ENDLOCAL
EXIT /B
2016-09-19 17:17:24 +02:00
:launch_imapsync
@SETLOCAL
ECHO IN %0 %*
.\imapsync.exe --host1 p --user1 tata --passfile1 secret.tata --host2 p --user2 titi --passfile2 secret.titi %*
@ENDLOCAL
@EXIT /B
2011-03-12 03:44:59 +01:00