From b31ac2dccefb82298fb777720b38eaad6f584b30 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 2 May 2023 20:32:38 +1000 Subject: free: Show single line statistics Added the -L --line option to free to show a small set of memory statistics on a single line of 80 characters. Largely based on the work of @Ulenrich1 and updated to the new API. References: procps-ng/procps#156 Signed-off-by: Craig Small --- testsuite/free.test/free.exp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testsuite') diff --git a/testsuite/free.test/free.exp b/testsuite/free.test/free.exp index 3d75530..d55fa53 100644 --- a/testsuite/free.test/free.exp +++ b/testsuite/free.test/free.exp @@ -55,3 +55,7 @@ set test "free with positive repeat count" spawn $free -c 2 expect_continue "$test" "^${free_header}" expect_pass "$test" "${free_header}" + +set test "free with single line" +spawn $free -L +expect_pass "$test" "^SwapUse\\s+\\d+\\s+CachUse\\s+\\d+\\s+MemUse\\s+\\d+\\s+MemFree\\s+\\d+\\s*$" -- cgit v1.2.1