]> git.proxmox.com Git - pve-common.git/commit
fix convert_size with decimal numbers and add tests
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 15 Dec 2017 09:58:10 +0000 (10:58 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 15 Dec 2017 10:15:50 +0000 (11:15 +0100)
commit95386dafb7c975f9384e6d93e84a3029f6d910f8
tree8a58b243a6acb38221cd471adb7b2dfcfb223136
parent76cbfc85dffa86d4e46bfc0f1ea748d3ce2ea3f4
fix convert_size with decimal numbers and add tests

converting from 0.5 gb to mb resulted in 0 mb
with this patch it correctly returns 512

also add tests and catch more errors

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/Tools.pm
test/Makefile
test/convert_size_test.pl [new file with mode: 0755]