summaryrefslogtreecommitdiff
path: root/test/test_ipaddr.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-05-07 08:39:42 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-10-07 18:22:42 +0900
commit38da84296c0e50c4285d8a8c146af5fc3c8afc7d (patch)
treecab31bcaeb97eb185897cd1ab518c452258766a4 /test/test_ipaddr.rb
parent54ee22be5308ee958a73bd546bc867d2337d74d8 (diff)
[ruby/ipaddr] Raise if extra slashes follow
https://bugs.ruby-lang.org/issues/15832 https://github.com/ruby/ipaddr/commit/de9805d6fa
Diffstat (limited to 'test/test_ipaddr.rb')
-rw-r--r--test/test_ipaddr.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_ipaddr.rb b/test/test_ipaddr.rb
index e2243dc542..3c3d70e3f2 100644
--- a/test/test_ipaddr.rb
+++ b/test/test_ipaddr.rb
@@ -91,6 +91,7 @@ class TC_IPAddr < Test::Unit::TestCase
assert_raise(IPAddr::InvalidAddressError) { IPAddr.new("[192.168.1.2]/120") }
assert_raise(IPAddr::InvalidAddressError) { IPAddr.new("[2001:200:300::]\nINVALID") }
assert_raise(IPAddr::InvalidAddressError) { IPAddr.new("192.168.0.1/32\nINVALID") }
+ assert_raise(IPAddr::InvalidAddressError) { IPAddr.new("192.168.0.1/32/20") }
assert_raise(IPAddr::InvalidPrefixError) { IPAddr.new("::1/255.255.255.0") }
assert_raise(IPAddr::InvalidPrefixError) { IPAddr.new("::1/129") }
assert_raise(IPAddr::InvalidPrefixError) { IPAddr.new("192.168.0.1/33") }