tcpip_test.go 496 B

1234567891011121314151617181920
  1. // Copyright 2014 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package ssh
  5. import (
  6. "testing"
  7. )
  8. func TestAutoPortListenBroken(t *testing.T) {
  9. broken := "SSH-2.0-OpenSSH_5.9hh11"
  10. works := "SSH-2.0-OpenSSH_6.1"
  11. if !isBrokenOpenSSHVersion(broken) {
  12. t.Errorf("version %q not marked as broken", broken)
  13. }
  14. if isBrokenOpenSSHVersion(works) {
  15. t.Errorf("version %q marked as broken", works)
  16. }
  17. }