lsmem: make printable columns override split columns if no split columns are provided

This commit is contained in:
Foorack
2025-02-09 16:15:39 +01:00
parent f188fd2ae0
commit 134ea11f5d
3 changed files with 57 additions and 10 deletions
+9
View File
@@ -120,6 +120,15 @@ fn test_split_node() {
sysroot_test_with_args("test_lsmem_split_node.expected", &["-S", "node"]);
}
#[test]
fn test_split_output_default() {
// If split is not provided, then it defaults to splitting on the provided(or default) columns
sysroot_test_with_args(
"test_lsmem_split_output_default.expected",
&["-o", "block,size,zones,node"],
);
}
#[test]
fn test_split_removable() {
sysroot_test_with_args("test_lsmem_split_removable.expected", &["-S", "removable"]);
@@ -0,0 +1,8 @@
BLOCK SIZE ZONES NODE
0 128M None 0
1-6 768M DMA32 0
32-149 14.8G Normal 0
Memory block size: 128M
Total online memory: 15.6G
Total offline memory: 0B