diff options
author | Craig Small <csmall@dropbear.xyz> | 2023-05-02 20:32:38 +1000 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2023-05-02 20:32:38 +1000 |
commit | b31ac2dccefb82298fb777720b38eaad6f584b30 (patch) | |
tree | 39878fd5c60708bdea563590cff46f529c7bc1e4 /testsuite | |
parent | 4a315c923067dea8fb985e5791cd118a256ec209 (diff) | |
download | procps-ng-b31ac2dccefb82298fb777720b38eaad6f584b30.tar.gz |
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 <csmall@dropbear.xyz>
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/free.test/free.exp | 4 |
1 files changed, 4 insertions, 0 deletions
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*$" |