From 9e06938c75b698f611b1c67f99c583618a701e96 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 9 Nov 2020 10:41:55 +0100 Subject: [PATCH] Number-Helper-Tests: Warnungen vermeiden $config war unbenutzt und wurde deshalb entfernt. Die Variable stammt aus dem alten form/round_amount.t-Test, wo sie ebenfalls zwar deklariert war aber nicht benutzt wurde. --- t/helper/number.t | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/t/helper/number.t b/t/helper/number.t index f3604f2a3..e50bd219f 100644 --- a/t/helper/number.t +++ b/t/helper/number.t @@ -27,7 +27,7 @@ sub test_format { } # test _format_total - if ($places == 2) { + if (($places // 0) == 2) { is (_format_total($amount, numberformat => $numberformat, dash => $dash), $expected, "$comment - explicit"); { @@ -61,8 +61,6 @@ test_format('1.00045', 1.00045, -5, '1,000.00', undef, 'negative places 2'); test_format('1.00', 1, -2, '1,000.00', undef, 'negative places 3'); # bugs amd edge cases -$config->{numberformat} = '1.000,00'; - test_format('0,00005', 0.00005, undef, '1.000,00', undef, 'messing with small numbers and no precision'); test_format('0', undef, undef, '1.000,00', undef, 'undef'); test_format('0', '', undef, '1.000,00', undef, 'empty string'); -- 2.20.1