bpo-39055: Reject a trailing \n in base64.b64decode() with validate=True. (GH-17616)

(cherry picked from commit b19c0d77e6f25ea831ab608c71f15d0d9266c8c4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py
index 2a4cc2a..7dba663 100644
--- a/Lib/test/test_base64.py
+++ b/Lib/test/test_base64.py
@@ -250,6 +250,7 @@
                  (b'3d}==', b'\xdd'),
                  (b'@@', b''),
                  (b'!', b''),
+                 (b"YWJj\n", b"abc"),
                  (b'YWJj\nYWI=', b'abcab'))
         funcs = (
             base64.b64decode,