summaryrefslogtreecommitdiff
path: root/test/digest
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-21 01:31:51 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-21 01:31:51 +0000
commit543c99e25ac4ba7cb02e7349ce9c747ffd17920d (patch)
tree7c5a5f441c5f0641e4524d9e8141994b2623a180 /test/digest
parent4b130154478808bb3dd8204e21060dd808e54fd2 (diff)
* test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/digest')
-rwxr-xr-xtest/digest/test_digest.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/digest/test_digest.rb b/test/digest/test_digest.rb
index 090b1ea..36a8635 100755
--- a/test/digest/test_digest.rb
+++ b/test/digest/test_digest.rb
@@ -7,7 +7,7 @@ require 'test/unit'
require 'tempfile'
require 'digest'
-%w[digest/md5 digest/rmd160 digest/sha1 digest/sha2].each do |lib|
+%w[digest/md5 digest/rmd160 digest/sha1 digest/sha2 digest/bubblebabble].each do |lib|
begin
require lib
rescue LoadError
@@ -104,6 +104,11 @@ module TestDigest
}
end
+ def test_bubblebabble
+ expected = "xopoh-fedac-fenyh-nehon-mopel-nivor-lumiz-rypon-gyfot-cosyz-rimez-lolyv-pekyz-rosud-ricob-surac-toxox"
+ assert_equal Digest::SHA256.bubblebabble('message'), expected
+ end
+
class TestMD5 < Test::Unit::TestCase
include TestDigest
ALGO = Digest::MD5