mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
39 lines
948 B
Plaintext
39 lines
948 B
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
#!/BIN/SH
|
||
#
|
||
# This script tests the 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 CorrectValue = "b10a8db164e0754105b7a99be72e3fe5"
|
||
ECHO "\f\n MD5 Test"
|
||
ECHO "\n\nThis script tests the MD5 command to make sure"
|
||
ECHO "it is properly generating and returning correct"
|
||
ECHO "MD5 values.\n\n"
|
||
SET Result = `MD5 -D "$TestPhrase"`
|
||
IF [ $Result = $CorrectValue ]
|
||
ECHO "This Test Passed"
|
||
IF [ -N $Log ]
|
||
SET T = $T + 1
|
||
SET P = $P + 1
|
||
ECHO "MD5 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 "MD5 Test Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
echo \n\n
|
||
MAN
|
||
TEXT /MAKE/USR/SHARE/TESTS/MD5TEST
|