blob: 169ff004683acd51ed210d6f031acf427a7125e3 [file] [log] [blame]
Serge Bazanskid4438d62021-05-23 13:37:30 +02001package ident
2
3import "testing"
4
5// TestRequestEncode exercises the (simple) functionality of Reequest.encode.
6func 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}