diff options
author | Matt Delaney <matthew.l.delaney@gmail.com> | 2015-05-26 10:21:06 -0600 |
---|---|---|
committer | Matt Delaney <delaney@tubularlabs.com> | 2016-09-10 17:17:10 -0700 |
commit | 21d971a74d674aaa6cfd64454061d957dfccecc7 (patch) | |
tree | db9e76de4ecf8a96bfe9b7efed80a3d7d941aeed /test | |
parent | 5b668d5ef34102c9ac159a8f21c889fdc7f99f1b (diff) | |
download | net-ssh-multi-21d971a74d674aaa6cfd64454061d957dfccecc7.tar.gz |
Fixed host parsing to work with ipv6 addresses
can now put [ ] around the ip address, without this ipv6 addresses that
are like 2605:fd00:4:1000:f816:3eff:fe33:4679 would be have '4679' be
interpreted as a port number.
Diffstat (limited to 'test')
-rw-r--r-- | test/server_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/server_test.rb b/test/server_test.rb index 544ea16..ecfa12e 100644 --- a/test/server_test.rb +++ b/test/server_test.rb @@ -14,6 +14,10 @@ class ServerTest < Minitest::Test assert_equal "hello", server('host', :properties => { :foo => "hello" })[:foo] end + def test_ipv6_works_with_given_port_using_bracket_notation + assert_equal 9022, server('[2001:DB8::1234]:9022').port + end + def test_port_should_return_22_by_default assert_equal 22, server('host').port end |