aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2024-02-08 07:41:23 -0600
committerBrent Cook <busterb@gmail.com>2024-02-12 03:15:18 -0600
commit1f0e198ed641527e6bc60cbdc1d2b74da20972f7 (patch)
treee51351faf46c381117c9e17cb780ae8ba1a71a91 /tests
parentff0300c550905b7b7a28e452c2d48a3f2e98dad5 (diff)
downloadportable-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.
Diffstat (limited to 'tests')
-rw-r--r--tests/testenc.bat37
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 @@
2setlocal enabledelayedexpansion 2setlocal enabledelayedexpansion
3REM testenc.bat 3REM testenc.bat
4 4
5set test=p 5set test=P
6 6
7set openssl_bin=%1 7set openssl_bin=%1
8set openssl_bin=%openssl_bin:/=\% 8set openssl_bin=%openssl_bin:/=\%
9if not exist %openssl_bin% exit /b 1 9if not exist %openssl_bin% exit /b 1
10 10
11echo copy %srcdir%\openssl.cnf %test%
11copy %srcdir%\openssl.cnf %test% 12copy %srcdir%\openssl.cnf %test%
12 13
13echo cat 14echo cat
14%openssl_bin% enc -in %test% -out %test%.cipher 15echo %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
16fc /b %test% %test%.clear 17%openssl_bin% enc -in %test%.CIPHER -out %test%.CLEAR
18fc /b %test% %test%.CLEAR
17if !errorlevel! neq 0 ( 19if !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
23echo base64 25echo 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
26fc /b %test% %test%.clear 28dir
29fc /b %test% %test%.CLEAR
27if !errorlevel! neq 0 ( 30if !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
33for %%i in ( 36for %%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