From 2b06c64d4fcb0b27d88aa08b69d2db9c58c7d59b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 25 Jul 2024 19:50:16 +0100 Subject: [PATCH] request_test: add another missing test case --- request_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/request_test.go b/request_test.go index 9bb7ad4..146eac2 100644 --- a/request_test.go +++ b/request_test.go @@ -59,10 +59,10 @@ func teardown() { } func TestMain(m *testing.M) { - setup() + flag.Parse() + setup() exitCode := m.Run() - teardown() os.Exit(exitCode) @@ -148,8 +148,9 @@ func TestParseResponse(t *testing.T) { want int }{ {RawResponse("ok"), 1}, - {RawResponse("ok\r\nok"), 2}, {RawResponse(" ok "), 1}, + {RawResponse("ok\r\nok"), 2}, + {RawResponse(" \r\nok\r\n \r\n ok"), 2}, {RawResponse(strings.Repeat("ok\r\n", 5)), 5}, {RawResponse(strings.Repeat("ok\r\n\r\n", 5)), 5}, {RawResponse(strings.Repeat("ok\r\n\n", 10)), 10},