From 47a568e076ba6b3ac1f48e08627c1f7237dd6a99 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Mon, 5 Dec 2022 20:51:30 +0100 Subject: [PATCH] text,test: Unbeak base64 tests --- format/text/testdata/base64.fqtest | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/format/text/testdata/base64.fqtest b/format/text/testdata/base64.fqtest index be933cb5..909786c7 100644 --- a/format/text/testdata/base64.fqtest +++ b/format/text/testdata/base64.fqtest @@ -1,4 +1,18 @@ -$ fq -n '"ff7f00" | frombase64 | ., (("", "std", "url", "rawstd", "rawurl") as $e | tobase64({encoding: $e}) | ., frombase64({encoding: $e}) -exitcode: 3 -stderr: -error: arg:1:131: unexpected EOF +$ fq -n '"ff7f00ff" | fromhex | ., ("", "std", "url", "rawstd", "rawurl") as $e | tobase64({encoding: $e}) | ., frombase64({encoding: $e})' + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| +0x0|ff 7f 00 ff| |....| |.: raw bits 0x0-0x3.7 (4) +"/38A/w==" + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| +0x0|ff 7f 00 ff| |....| |.: raw bits 0x0-0x3.7 (4) +"/38A/w==" + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| +0x0|ff 7f 00 ff| |....| |.: raw bits 0x0-0x3.7 (4) +"_38A_w==" + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| +0x0|ff 7f 00 ff| |....| |.: raw bits 0x0-0x3.7 (4) +"/38A/w" + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| +0x0|ff 7f 00 ff| |....| |.: raw bits 0x0-0x3.7 (4) +"_38A_w" + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| +0x0|ff 7f 00 ff| |....| |.: raw bits 0x0-0x3.7 (4)