mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
TESTS: add MD4 test
This commit is contained in:
parent
a414e9d080
commit
61d4cc9a42
38
TESTS/MD4TEST.txt
Normal file
38
TESTS/MD4TEST.txt
Normal file
@ -0,0 +1,38 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
# This script tests the MD4 command to make sure
|
||||
# it is properly generating and returning correct
|
||||
# MD4 values.
|
||||
#
|
||||
# This test uses the SET var = `command` directive,
|
||||
# testing that facility as well.
|
||||
#
|
||||
SET TestPhrase = "Hello World"
|
||||
SET CorrectValue = "77A781B995CF1CFAF39D9E2F5910C2CF"
|
||||
ECHO "\f\n MD4 Test"
|
||||
ECHO "\n\nThis script tests the MD4 command to make sure"
|
||||
ECHO "it is properly generating and returning correct"
|
||||
ECHO "MD4 values.\n\n"
|
||||
SET Result = `MD4 -D "$TestPhrase"`
|
||||
IF [ $Result = $CorrectValue ]
|
||||
ECHO "This Test Passed"
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET P = $P + 1
|
||||
ECHO "MD4 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 "MD4 Test Failed" >> ${Log}
|
||||
FI
|
||||
FI
|
||||
echo \n\n
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/MD4TEST
|
Loading…
Reference in New Issue
Block a user