updated hmacmd5test script to change save location and convert \n to \r\n

This commit is contained in:
Patrick Kloepfer 2021-07-27 08:01:35 -04:00
parent ef3398214f
commit f8b8e13285

View File

@ -1,39 +1,39 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This script tests the HMAC-MD5 command to make
# sure it is properly generating and returning
# correct MD5 values.
#
# This test uses the SET var = `command` directive,
# testing that facility as well.
#
SET TestPhrase = "Hello World"
SET TestKey = "Super Secret Key"
SET CorrectValue = "41E1F2EE77BA4551318745CE12A4A6A4"
ECHO "\f\n HMAC-MD5 Test"
ECHO "\n\nThis script tests the HMAC-MD5 command to make"
ECHO "sure it is properly generating and returning"
ECHO "correct HMAC-MD5 values.\n\n"
SET Result = `HMACMD5 -D "$TestPhrase" -K "$TestKey"`
IF [ $Result = $CorrectValue ]
ECHO "This Test Passed"
IF [ -N $Log ]
SET T = $T + 1
SET P = $P + 1
ECHO "HMACMD5 Test Passed" >> ${Log}
FI
ELSE
ECHO "This Test Failed"
ECHO "The returned result was: $Result"
IF [ -N $Log ]
SET T = $T + 1
SET F = $F + 1
ECHO "HMACMD5 Test Failed" >> ${Log}
FI
FI
echo \n\n
MAN
TEXT root/HMACMD5TEST
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This script tests the HMAC-MD5 command to make
# sure it is properly generating and returning
# correct MD5 values.
#
# This test uses the SET var = `command` directive,
# testing that facility as well.
#
SET TestPhrase = "Hello World"
SET TestKey = "Super Secret Key"
SET CorrectValue = "41E1F2EE77BA4551318745CE12A4A6A4"
ECHO "\f\n HMAC-MD5 Test"
ECHO "\n\nThis script tests the HMAC-MD5 command to make"
ECHO "sure it is properly generating and returning"
ECHO "correct HMAC-MD5 values.\n\n"
SET Result = `HMACMD5 -D "$TestPhrase" -K "$TestKey"`
IF [ $Result = $CorrectValue ]
ECHO "This Test Passed"
IF [ -N $Log ]
SET T = $T + 1
SET P = $P + 1
ECHO "HMACMD5 Test Passed" >> ${Log}
FI
ELSE
ECHO "This Test Failed"
ECHO "The returned result was: $Result"
IF [ -N $Log ]
SET T = $T + 1
SET F = $F + 1
ECHO "HMACMD5 Test Failed" >> ${Log}
FI
FI
echo \n\n
MAN
TEXT /MAKE/USR/SHARE/TESTS/HMACMD5TEST