diff --git a/test/test_securerandom.rb b/test/test_securerandom.rb index 0a78624..c51bec2 100644 --- a/test/test_securerandom.rb +++ b/test/test_securerandom.rb @@ -164,6 +164,27 @@ end end end + def test_choose + 65.times do |idx| + ch = @it.choose([*'a'..'e', *'0'..'5']) + assert_match(/^[a-e0-5]+$/, ch) + end + end + + def test_graph + 65.times do |idx| + g = @it.graph + assert_match(/^[!-~]+$/, g) + end + end + + def test_alphanumeric + 65.times do |idx| + an = @it.alphanumeric + assert_match(/^[0-9a-zA-Z]+$/, an) + end + end + def protect begin yield