base64.test
This file
Path
tests/base64.test
47 lines · 764 bytes
Last changed by
Improve error message truncation with closing delimiters (#3478)itchynybefore adoption22361cf
History of this fileTake it
1# Tests are groups of three lines: program, input, expected output2# Blank lines and lines starting with # are ignored34@base645""6""78@base649"<>&'\"\t"10"PD4mJyIJ"1112# decoding encoded output results in same text13(@base64|@base64d)14"<>&'\"\t"15"<>&'\"\t"1617# regression test for #43618@base6419"foóbar\n"20"Zm/Ds2Jhcgo="2122@base64d23""24""2526@base64d27"="28""2930@base64d31"Zm/Ds2Jhcgo="32"foóbar\n"3334# optional trailing equals padding (With padding, this is cWl4YmF6Cg==)35@base64d36"cWl4YmF6Cg"37"qixbaz\n"3839# invalid base64 characters (whitespace)40. | try @base64d catch .41"Not base64 data"42"string (\"Not base64 data\") is not valid base64 data"4344# invalid base64 (too many bytes, QUJD = "ABCD"45. | try @base64d catch .46"QUJDa"47"string (\"QUJDa\") trailing base64 byte found"