Skip to content

Commit

Permalink
Merge pull request #5532 from cakebaker/df_fix_5531
Browse files Browse the repository at this point in the history
df: fix rounding issue in test
  • Loading branch information
sylvestre authored Dec 25, 2023
2 parents 840a5bf + 0164934 commit 6ce9d84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/by-util/test_df.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 6ce9d84

Please sign in to comment.