mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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
					
				
					 2 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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>
 | 
			
		||||
 | 
			
		||||
	* tool/instruction.rb : fix typo.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue