diff options
| author | Brent Cook <busterb@gmail.com> | 2024-02-08 07:41:23 -0600 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2024-02-12 03:15:18 -0600 |
| commit | 1f0e198ed641527e6bc60cbdc1d2b74da20972f7 (patch) | |
| tree | e51351faf46c381117c9e17cb780ae8ba1a71a91 | |
| parent | ff0300c550905b7b7a28e452c2d48a3f2e98dad5 (diff) | |
| download | portable-1f0e198ed641527e6bc60cbdc1d2b74da20972f7.tar.gz portable-1f0e198ed641527e6bc60cbdc1d2b74da20972f7.tar.bz2 portable-1f0e198ed641527e6bc60cbdc1d2b74da20972f7.zip | |
fix file comparison failures testing with WSL + CMake
Using FC on Windows through a WSL mount assumes all filenames are UPPERCASE.
So make the filenames UPPERCASE in the first place.
| -rw-r--r-- | tests/testenc.bat | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/tests/testenc.bat b/tests/testenc.bat index 93dfc0c..84f48f2 100644 --- a/tests/testenc.bat +++ b/tests/testenc.bat | |||
| @@ -2,32 +2,35 @@ | |||
| 2 | setlocal enabledelayedexpansion | 2 | setlocal enabledelayedexpansion |
| 3 | REM testenc.bat | 3 | REM testenc.bat |
| 4 | 4 | ||
| 5 | set test=p | 5 | set test=P |
| 6 | 6 | ||
| 7 | set openssl_bin=%1 | 7 | set openssl_bin=%1 |
| 8 | set openssl_bin=%openssl_bin:/=\% | 8 | set openssl_bin=%openssl_bin:/=\% |
| 9 | if not exist %openssl_bin% exit /b 1 | 9 | if not exist %openssl_bin% exit /b 1 |
| 10 | 10 | ||
| 11 | echo copy %srcdir%\openssl.cnf %test% | ||
| 11 | copy %srcdir%\openssl.cnf %test% | 12 | copy %srcdir%\openssl.cnf %test% |
| 12 | 13 | ||
| 13 | echo cat | 14 | echo cat |
| 14 | %openssl_bin% enc -in %test% -out %test%.cipher | 15 | echo %openssl_bin% enc -in %test% -out %test%.CIPHER |
| 15 | %openssl_bin% enc -in %test%.cipher -out %test%.clear | 16 | %openssl_bin% enc -in %test% -out %test%.CIPHER |
| 16 | fc /b %test% %test%.clear | 17 | %openssl_bin% enc -in %test%.CIPHER -out %test%.CLEAR |
| 18 | fc /b %test% %test%.CLEAR | ||
| 17 | if !errorlevel! neq 0 ( | 19 | if !errorlevel! neq 0 ( |
| 18 | exit /b 1 | 20 | exit /b 1 |
| 19 | ) else ( | 21 | ) else ( |
| 20 | del %test%.cipher %test%.clear | 22 | del %test%.CIPHER %test%.CLEAR |
| 21 | ) | 23 | ) |
| 22 | 24 | ||
| 23 | echo base64 | 25 | echo base64 |
| 24 | %openssl_bin% enc -a -e -in %test% -out %test%.cipher | 26 | %openssl_bin% enc -a -e -in %test% -out %test%.CIPHER |
| 25 | %openssl_bin% enc -a -d -in %test%.cipher -out %test%.clear | 27 | %openssl_bin% enc -a -d -in %test%.CIPHER -out %test%.CLEAR |
| 26 | fc /b %test% %test%.clear | 28 | dir |
| 29 | fc /b %test% %test%.CLEAR | ||
| 27 | if !errorlevel! neq 0 ( | 30 | if !errorlevel! neq 0 ( |
| 28 | exit /b 1 | 31 | exit /b 1 |
| 29 | ) else ( | 32 | ) else ( |
| 30 | del %test%.cipher %test%.clear | 33 | del %test%.CIPHER %test%.CLEAR |
| 31 | ) | 34 | ) |
| 32 | 35 | ||
| 33 | for %%i in ( | 36 | for %%i in ( |
| @@ -45,23 +48,23 @@ for %%i in ( | |||
| 45 | rc4 rc4-40 | 48 | rc4 rc4-40 |
| 46 | ) do ( | 49 | ) do ( |
| 47 | echo %%i | 50 | echo %%i |
| 48 | %openssl_bin% %%i -e -k test -in %test% -out %test%.%%i.cipher | 51 | %openssl_bin% %%i -e -k test -in %test% -out %test%.%%i.CIPHER |
| 49 | %openssl_bin% %%i -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear | 52 | %openssl_bin% %%i -d -k test -in %test%.%%i.CIPHER -out %test%.%%i.CLEAR |
| 50 | fc /b %test% %test%.%%i.clear | 53 | fc /b %test% %test%.%%i.CLEAR |
| 51 | if !errorlevel! neq 0 ( | 54 | if !errorlevel! neq 0 ( |
| 52 | exit /b 1 | 55 | exit /b 1 |
| 53 | ) else ( | 56 | ) else ( |
| 54 | del %test%.%%i.cipher %test%.%%i.clear | 57 | del %test%.%%i.CIPHER %test%.%%i.CLEAR |
| 55 | ) | 58 | ) |
| 56 | 59 | ||
| 57 | echo %%i base64 | 60 | echo %%i base64 |
| 58 | %openssl_bin% %%i -a -e -k test -in %test% -out %test%.%%i.cipher | 61 | %openssl_bin% %%i -a -e -k test -in %test% -out %test%.%%i.CIPHER |
| 59 | %openssl_bin% %%i -a -d -k test -in %test%.%%i.cipher -out %test%.%%i.clear | 62 | %openssl_bin% %%i -a -d -k test -in %test%.%%i.CIPHER -out %test%.%%i.CLEAR |
| 60 | fc /b %test% %test%.%%i.clear | 63 | fc /b %test% %test%.%%i.CLEAR |
| 61 | if !errorlevel! neq 0 ( | 64 | if !errorlevel! neq 0 ( |
| 62 | exit /b 1 | 65 | exit /b 1 |
| 63 | ) else ( | 66 | ) else ( |
| 64 | del %test%.%%i.cipher %test%.%%i.clear | 67 | del %test%.%%i.CIPHER %test%.%%i.CLEAR |
| 65 | ) | 68 | ) |
| 66 | ) | 69 | ) |
| 67 | 70 | ||
