summaryrefslogtreecommitdiff
path: root/test/digest
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-18 04:26:06 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-18 04:26:06 +0000
commit74cacd0df4e6c6a504969d7eb10e76676a607fa3 (patch)
treed1da2a75e0970eb4c8a2204ccd5e884b42d5a816 /test/digest
parent0a8d8b8a684dc66669c6b2add3637c78673a97fe (diff)
* ext/digest/digest.c (rb_digest_class_init): Define
Digest::Class.new(). [Feature #3954] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/digest')
-rwxr-xr-xtest/digest/test_digest.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/digest/test_digest.rb b/test/digest/test_digest.rb
index e35047e..ac3db00 100755
--- a/test/digest/test_digest.rb
+++ b/test/digest/test_digest.rb
@@ -17,6 +17,12 @@ module TestDigest
Data1 = "abc"
Data2 = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ def test_s_new
+ self.class::DATA.each do |str, hexdigest|
+ assert_raise(ArgumentError) { self.class::ALGO.new("") }
+ end
+ end
+
def test_s_hexdigest
self.class::DATA.each do |str, hexdigest|
assert_equal(hexdigest, self.class::ALGO.hexdigest(str))