* 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
This commit is contained in:
parent
4b13015447
commit
543c99e25a
@ -1,3 +1,7 @@
|
|||||||
|
Thu Nov 21 10:30:47 2013 Zachary Scott <e@zzak.io>
|
||||||
|
|
||||||
|
* test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble
|
||||||
|
|
||||||
Wed Nov 20 20:54:01 2013 Masaya Tarui <tarui@ruby-lang.org>
|
Wed Nov 20 20:54:01 2013 Masaya Tarui <tarui@ruby-lang.org>
|
||||||
|
|
||||||
* tool/instruction.rb : fix typo.
|
* tool/instruction.rb : fix typo.
|
||||||
|
@ -7,7 +7,7 @@ require 'test/unit'
|
|||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
|
|
||||||
require 'digest'
|
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
|
begin
|
||||||
require lib
|
require lib
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
@ -104,6 +104,11 @@ module TestDigest
|
|||||||
}
|
}
|
||||||
end
|
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
|
class TestMD5 < Test::Unit::TestCase
|
||||||
include TestDigest
|
include TestDigest
|
||||||
ALGO = Digest::MD5
|
ALGO = Digest::MD5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user