diff options
| author | delano <delano@solutious.com> | 2010-01-16 11:59:23 -0500 |
|---|---|---|
| committer | delano <delano@solutious.com> | 2010-01-16 11:59:23 -0500 |
| commit | b0dd0c8f25cc1f3626e08f1b1df8226e8a7aabd3 (patch) | |
| tree | b68c84ae561a86b1a74c9f06f88c903b8ae86548 /test | |
| parent | da383eccc14ceae5a3eebe44d9f1a1c0f31ccfa5 (diff) | |
| download | net-ssh-b0dd0c8f25cc1f3626e08f1b1df8226e8a7aabd3.tar.gz | |
Added test for plus sign support in sshconfig hostname (Ruby 1.8)
Diffstat (limited to 'test')
| -rw-r--r-- | test/configs/host_plus | 10 | ||||
| -rw-r--r-- | test/test_config.rb | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/test/configs/host_plus b/test/configs/host_plus index e69de29..b3177db 100644 --- a/test/configs/host_plus +++ b/test/configs/host_plus @@ -0,0 +1,10 @@ +# Jump through hosts with one SSH call +# via <http://glandium.org/blog/?p=308> +Host *+* + ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') PATH=.:\$PATH nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /') + +Host office-offsite + HostName work-gateway+office-workstation + +Host test.host + Compression yes
\ No newline at end of file diff --git a/test/test_config.rb b/test/test_config.rb index 82ad815..cb2ef48 100644 --- a/test/test_config.rb +++ b/test/test_config.rb @@ -90,7 +90,12 @@ class TestConfig < Test::Unit::TestCase assert_equal 1234, net_ssh[:port] assert_equal 1024, net_ssh[:rekey_limit] end - + + def test_load_with_plus_sign_hosts + config = Net::SSH::Config.load(config(:host_plus), "test.host") + assert config['compression'] + end + private def config(name) |
