Revision dc03543f
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
t/form/format_amount.t | ||
---|---|---|
33 | 33 |
|
34 | 34 |
$config->{numberformat} = '1,000.00'; |
35 | 35 |
|
36 |
is($form->format_amount($config, '1e1', 2), '10,00', 'format 1e1 (numberformat: 1,000.00)');
|
|
37 |
is($form->format_amount($config, 1000, 2), '1.000,00', 'format 1000 (numberformat: 1,000.00)');
|
|
38 |
is($form->format_amount($config, 1000.1234, 2), '1.000,12', 'format 1000.1234 (numberformat: 1,000.00)');
|
|
39 |
is($form->format_amount($config, 1000000000.1234, 2), '1.000.000.000,12', 'format 1000000000.1234 (numberformat: 1,000.00)');
|
|
40 |
is($form->format_amount($config, -1000000000.1234, 2), '-1.000.000.000,12', 'format -1000000000.1234 (numberformat: 1,000.00)');
|
|
36 |
is($form->format_amount($config, '1e1', 2), '10.00', 'format 1e1 (numberformat: 1,000.00)');
|
|
37 |
is($form->format_amount($config, 1000, 2), '1,000.00', 'format 1000 (numberformat: 1,000.00)');
|
|
38 |
is($form->format_amount($config, 1000.1234, 2), '1,000.12', 'format 1000.1234 (numberformat: 1,000.00)');
|
|
39 |
is($form->format_amount($config, 1000000000.1234, 2), '1,000,000,000.12', 'format 1000000000.1234 (numberformat: 1,000.00)');
|
|
40 |
is($form->format_amount($config, -1000000000.1234, 2), '-1,000,000,000.12', 'format -1000000000.1234 (numberformat: 1,000.00)');
|
|
41 | 41 |
|
42 | 42 |
done_testing; |
43 | 43 |
|
Auch abrufbar als: Unified diff
format_amount testscript wieder gerade gezogen
Die untere Hälfte Tests war in a0cd7d697f36397a32a90565fee3986f95f17e93 kaputtgegangen.