summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-08-16 21:45:47 -0700
committerPádraig Brady <P@draigBrady.com>2015-09-03 00:34:12 +0100
commitdf3b9120b4b0444bedbe53ef7a2cc5bb28fb3943 (patch)
tree4647b96f5f3c5340dd4353cbc3b7708acc8a0ed0 /tests
parenta8cc9ce3f290a83dfb656dabfab2a98e765a68a0 (diff)
downloadcoreutils-df3b9120b4b0444bedbe53ef7a2cc5bb28fb3943.tar.xz
base64: no longer support hex or oct --wrap params
* src/base64.c (main): Support decimal numbers with leading zeros, by disabling the auto detection of octal and hex. It's not envisaged that base conversion is needed for --wrap parameters, and in the edge case it is, $((0x0)) shell constructs can be used. * tests/misc/base64.pl: Adjust accordingly. * NEWS: Mention the change in behavior.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/base64.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/misc/base64.pl b/tests/misc/base64.pl
index 44c3d21ab..af397425c 100755
--- a/tests/misc/base64.pl
+++ b/tests/misc/base64.pl
@@ -71,7 +71,7 @@ sub gen_tests($)
['inout4', {IN=>'a'x4}, {OUT=>&$enc(4)."\n"}],
['inout5', {IN=>'a'x5}, {OUT=>&$enc(5)."\n"}],
['wrap', '--wrap 0', {IN=>'a'}, {OUT=>&$enc(1)}],
- ['wrap-hex', '--wrap 0x0', {IN=>'a'}, {OUT=>&$enc(1)}],
+ ['wrap-zero', '--wrap 08', {IN=>'a'}, {OUT=>&$enc(1)."\n"}],
['wrap5-39', '--wrap=5', {IN=>'a' x 39}, {OUT=>wrap &$enc(39),5}],
['wrap5-40', '--wrap=5', {IN=>'a' x 40}, {OUT=>wrap &$enc(40),5}],
['wrap5-41', '--wrap=5', {IN=>'a' x 41}, {OUT=>wrap &$enc(41),5}],
@@ -81,9 +81,9 @@ sub gen_tests($)
['wrap5-45', '--wrap=5', {IN=>'a' x 45}, {OUT=>wrap &$enc(45),5}],
['wrap5-46', '--wrap=5', {IN=>'a' x 46}, {OUT=>wrap &$enc(46),5}],
- ['wrap-bad-1', '-w08', {IN=>''}, {OUT=>""},
+ ['wrap-bad-1', '-w0x0', {IN=>''}, {OUT=>""},
{ERR_SUBST => 's/base..:/base..:/'},
- {ERR => "base..: invalid wrap size: '08'\n"}, {EXIT => 1}],
+ {ERR => "base..: invalid wrap size: '0x0'\n"}, {EXIT => 1}],
['wrap-bad-2', '-w1k', {IN=>''}, {OUT=>""},
{ERR_SUBST => 's/base..:/base..:/'},
{ERR => "base..: invalid wrap size: '1k'\n"}, {EXIT => 1}],