1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

df: fix rounding issue in test

Set block size to 1 so the returned values are the same values as
used for the calculation of the percentage values
This commit is contained in:
Daniel Hofstetter 2023-11-14 17:41:19 +01:00 committed by Sylvestre Ledru
parent 95852dbaa5
commit 0164934afe

View file

@ -422,7 +422,11 @@ fn test_total_label_in_correct_column() {
#[test]
fn test_use_percentage() {
let output = new_ucmd!()
.args(&["--total", "--output=used,avail,pcent"])
// set block size = 1, otherwise the returned values for
// "used" and "avail" will be rounded. And using them to calculate
// the "percentage" values might lead to a mismatch with the returned
// "percentage" values.
.args(&["--total", "--output=used,avail,pcent", "--block-size=1"])
.succeeds()
.stdout_move_str();