@@ -3,7 +3,7 @@ rem ===========================================================================
33rem \brief Testing command-line interface
44rem \project bee2evp/cmd
55rem \created 2022.06.24
6- rem \version 2025.04.23
6+ rem \version 2025.04.24
77rem \pre The working directory contains zed.csr.
88rem ===========================================================================
99
@@ -13,6 +13,9 @@ rem ===========================================================================
1313
1414echo ****** Testing bee2cmd/ver...
1515
16+ bee2cmd
17+ if %ERRORLEVEL% equ 0 goto Error
18+
1619bee2cmd ver
1720if %ERRORLEVEL% neq 0 goto Error
1821
@@ -29,6 +32,9 @@ echo ****** Testing bee2cmd/bsum...
2932
3033del /q check32 check256 -c 2 > nul
3134
35+ bee2cmd bsum
36+ if %ERRORLEVEL% equ 0 goto Error
37+
3238bee2cmd bsum -bash31 bee2cmd.exe
3339if %ERRORLEVEL% equ 0 goto Error
3440
@@ -84,6 +90,9 @@ echo ****** Testing bee2cmd/pwd...
8490
8591del /q s1 s2 s3 s4 s5 2 > nul
8692
93+ bee2cmd pwd
94+ if %ERRORLEVEL% equ 0 goto Error
95+
8796bee2cmd pwd gen pass:zed
8897if %ERRORLEVEL% equ 0 goto Error
8998
@@ -204,6 +213,9 @@ echo ****** Testing bee2cmd/kg...
204213
205214del /q privkey0 privkey1 privkey2 privkey3 pubkey0 pubkey2 pubkey3 2 > nul
206215
216+ bee2cmd kg
217+ if %ERRORLEVEL% equ 0 goto Error
218+
207219bee2cmd kg gen -l256 -pass share:" -pass pass:zed s2 s3 s4"
208220if %ERRORLEVEL% equ 0 goto Error
209221
@@ -257,6 +269,9 @@ echo ****** Testing bee2cmd/cvc...
257269
258270del /q cert0 req1 cert1 pubkey1 req2 req21 cert2 req3 cert3 2 > nul
259271
272+ bee2cmd cvc
273+ if %ERRORLEVEL% equ 0 goto Error
274+
260275bee2cmd cvc root -authority BYCA0000 -from 220707 -until 990707 ^
261276 -pass pass:root -eid EEEEEEEEEE -esign 7777 privkey0 cert0
262277if %ERRORLEVEL% neq 0 goto Error
@@ -391,6 +406,9 @@ del /q ff ss cert01 cert11 cert21 body sig 2> nul
391406echo test> ff
392407echo sig> ss
393408
409+ bee2cmd sig
410+ if %ERRORLEVEL% equ 0 goto Error
411+
394412bee2cmd sig val -pubkey pubkey2 ff ss
395413if %ERRORLEVEL% equ 0 goto Error
396414
@@ -543,6 +561,9 @@ echo ****** Testing bee2cmd/cvr...
543561
544562del /q ring2 cert21 cert31 2 > nul
545563
564+ bee2cmd cvr
565+ if %ERRORLEVEL% equ 0 goto Error
566+
546567bee2cmd cvr init -pass pass:alice privkey2 cert2 ring2
547568if %ERRORLEVEL% neq 0 goto Error
548569
@@ -615,6 +636,9 @@ echo ****** Testing bee2cmd/csr...
615636
616637del /q zed.sk1 zed.csr1 2 > nul
617638
639+ bee2cmd csr
640+ if %ERRORLEVEL% equ 0 goto Error
641+
618642bee2cmd csr val zed.csr
619643if %ERRORLEVEL% neq 0 goto Error
620644
@@ -639,6 +663,9 @@ del /q body stamp 2> nul
639663
640664echo body> body
641665
666+ bee2cmd stamp
667+ if %ERRORLEVEL% equ 0 goto Error
668+
642669bee2cmd stamp val body
643670if %ERRORLEVEL% equ 0 goto Error
644671
@@ -679,6 +706,9 @@ echo ****** Testing bee2cmd/es...
679706
680707del /q dd 2 > nul
681708
709+ bee2cmd es
710+ if %ERRORLEVEL% equ 0 goto Error
711+
682712bee2cmd es print
683713if %ERRORLEVEL% neq 0 goto Error
684714
@@ -696,6 +726,9 @@ rem ===========================================================================
696726
697727echo ****** Testing bee2cmd/st...
698728
729+ bee2cmd st
730+ if %ERRORLEVEL% equ 0 goto Error
731+
699732bee2cmd st alg
700733if %ERRORLEVEL% neq 0 goto Error
701734
@@ -724,6 +757,9 @@ del /q body body1 stamp p1 p10 s0 2> nul
724757echo body> body
725758echo body> body1
726759
760+ bee2cmd affix
761+ if %ERRORLEVEL% equ 0 goto Error
762+
727763for /f " tokens=* USEBACKQ" %%F in (`bee2cmd affix print -sc body`) do (
728764 set sc = %%F
729765)
0 commit comments