Serge Bazanski | d4438d6 | 2021-05-23 13:37:30 +0200 | [diff] [blame] | 1 | package ident |
2 | |||||
3 | import "testing" | ||||
4 | |||||
5 | // TestRequestEncode exercises the (simple) functionality of Reequest.encode. | ||||
6 | func TestRequestEncode(t *testing.T) { | ||||
7 | r := Request{ | ||||
8 | ClientPort: 123, | ||||
9 | ServerPort: 234, | ||||
10 | } | ||||
11 | if want, got := "234,123\r\n", string(r.encode()); want != got { | ||||
12 | t.Errorf("Wanted %q, got %q", want, got) | ||||
13 | } | ||||
14 | } |