Skip to content

Commit

Permalink
Correct sha1 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Feb 6, 2014
1 parent 891d5f0 commit ff5db1c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/tests/keywords/sha1
Expand Up @@ -7,31 +7,35 @@ update {
request:Tmp-Octets-0 := 0x000504030201
}

update reply {
Filter-Id := 'filter'
}

#
# Put "This is a string" into a file and call "sha1sum" on it.
# You should get this string.
#
if ("%{sha1:This is a string\n}" == 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
if ("%{sha1:This is a string\n}" != 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
update reply {
Filter-Id := 'filter'
Filter-Id += 'fail'
}
}

if ("%{sha1:&Tmp-String-0}" == 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
if ("%{sha1:&Tmp-String-0}" != 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
update reply {
Filter-Id := 'filter'
Filter-Id += 'fail'
}
}

if ("%{sha1:&request:Tmp-String-0}" == 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
if ("%{sha1:&request:Tmp-String-0}" != 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
update reply {
Filter-Id := 'filter'
Filter-Id += 'fail'
}
}

if ("%{sha1:%{Tmp-String-0}}" == 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
if ("%{sha1:%{Tmp-String-0}}" != 'cc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c') {
update reply {
Filter-Id := 'filter'
Filter-Id += 'fail'
}
}

Expand Down

0 comments on commit ff5db1c

Please sign in to comment.