diff options
-rw-r--r-- | tests/test_util.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index e25f0563..87624711 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -248,6 +248,19 @@ Host * val ) + def test_11_proxycommand_tilde_expansion(self): + """ + Tilde (~) should be expanded inside ProxyCommand + """ + config = paramiko.util.parse_ssh_config(StringIO(""" +Host test + ProxyCommand ssh -F ~/.ssh/test_config bastion nc %h %p +""")) + self.assertEqual( + 'ssh -F %s/.ssh/test_config bastion nc test 22' % os.path.expanduser('~'), + host_config('test', config)['proxycommand'] + ) + def test_11_host_config_test_negation(self): test_config_file = """ Host www13.* !*.example.com |