From: Santhosh Kumar Tekuri Date: Tue, 6 Feb 2018 06:30:13 +0000 (+0530) Subject: encoding/pem: test getLine does not include trailing whitespace X-Git-Tag: go1.12beta1~307 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=552d7b918697e0a5ab1ff22f91abf3e1cfde2e1d;p=gostls13.git encoding/pem: test getLine does not include trailing whitespace Change-Id: I7a1046f5e0aedbbdd1106a616de410fe4e0cb7d8 Reviewed-on: https://go-review.googlesource.com/c/92295 Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor --- diff --git a/src/encoding/pem/pem_test.go b/src/encoding/pem/pem_test.go index a1b5afac08..204611bda0 100644 --- a/src/encoding/pem/pem_test.go +++ b/src/encoding/pem/pem_test.go @@ -26,6 +26,10 @@ var getLineTests = []GetLineTest{ {"abc\r\nd", "abc", "d"}, {"\nabc", "", "abc"}, {"\r\nabc", "", "abc"}, + {"abc\t \nd", "abc", "d"}, + {"\t abc\nd", "\t abc", "d"}, + {"abc\n\t d", "abc", "\t d"}, + {"abc\nd\t ", "abc", "d\t "}, } func TestGetLine(t *testing.T) {