diff options
author | Saagar Jha <saagarjha@google.com> | 2023-05-04 13:50:00 -0700 |
---|---|---|
committer | Saagar Jha <saagarjha@google.com> | 2023-05-24 17:33:08 +0000 |
commit | 90f574f02e0b8432de2ad03951ea74df3464dc38 (patch) | |
tree | 3ab7f79695ce724adcaef52302b30ac1a8212858 /tests/test_ssh.py | |
parent | 551285fa35ccd0836513e9cf64ee8d3372e5e3f4 (diff) | |
download | git-repo-90f574f02e0b8432de2ad03951ea74df3464dc38.tar.gz |
Parse OpenSSH versions with no SSH_EXTRAVERSION
If the Debian banner is not used, then there won't be a space after the
version number: it'll be followed directly by a comma.
Bug: https://crbug.com/gerrit/16903
Change-Id: I12b873f32afc9424f42b772399c346f96ca95a96
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/372875
Tested-by: Saagar Jha <saagarjha@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'tests/test_ssh.py')
-rw-r--r-- | tests/test_ssh.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_ssh.py b/tests/test_ssh.py index a9c1be7f..d74f7fe8 100644 --- a/tests/test_ssh.py +++ b/tests/test_ssh.py | |||
@@ -39,6 +39,8 @@ class SshTests(unittest.TestCase): | |||
39 | "OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017\n" | 39 | "OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017\n" |
40 | ) | 40 | ) |
41 | self.assertEqual(ver, (7, 6)) | 41 | self.assertEqual(ver, (7, 6)) |
42 | ver = ssh._parse_ssh_version("OpenSSH_9.0p1, LibreSSL 3.3.6\n") | ||
43 | self.assertEqual(ver, (9, 0)) | ||
42 | 44 | ||
43 | def test_version(self): | 45 | def test_version(self): |
44 | """Check version() handling.""" | 46 | """Check version() handling.""" |