2019-02-22 03:47:12 +00:00
|
|
|
|
NEW
|
|
|
|
|
PREFIX
|
|
|
|
|
AUTO 4,1
|
|
|
|
|
#!/BIN/SH
|
|
|
|
|
#
|
2019-03-03 20:15:24 +00:00
|
|
|
|
# This script tests the MD5 command to make sure
|
|
|
|
|
# it is properly generating and returning correct
|
|
|
|
|
# MD5 values.
|
2019-02-22 03:47:12 +00:00
|
|
|
|
#
|
2019-03-03 20:15:24 +00:00
|
|
|
|
# This test uses the SET var = `command` directive,
|
|
|
|
|
# testing that facility as well.
|
2019-02-22 03:47:12 +00:00
|
|
|
|
#
|
2019-03-03 20:15:24 +00:00
|
|
|
|
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"
|
2019-03-04 02:43:07 +00:00
|
|
|
|
SET Result = `MD5 -D "$TestPhrase"`
|
2019-03-03 20:15:24 +00:00
|
|
|
|
IF [ $Result = $CorrectValue ]
|
|
|
|
|
ECHO "This Test Passed"
|
|
|
|
|
ELSE
|
|
|
|
|
ECHO "This Test Failed"
|
|
|
|
|
ECHO "The returned result was: $Result"
|
|
|
|
|
FI
|
2019-01-16 04:50:18 +00:00
|
|
|
|
echo \n\n
|
2019-02-22 03:47:12 +00:00
|
|
|
|
MAN
|
|
|
|
|
TEXT /MAKE/USR/SHARE/TESTS/MD5TEST
|