diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:34:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:34:44 +0000 |
commit | e3be059d4da38aa36f1aee1d56f8ceb943d92f1c (patch) | |
tree | 26edef31e4e503dd1c92a112de174f366dd61802 /testsuite/uptime.test/uptime.exp | |
parent | Initial commit. (diff) | |
download | procps-upstream.tar.xz procps-upstream.zip |
Adding upstream version 2:4.0.4.upstream/2%4.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/uptime.test/uptime.exp')
-rw-r--r-- | testsuite/uptime.test/uptime.exp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/uptime.test/uptime.exp b/testsuite/uptime.test/uptime.exp new file mode 100644 index 0000000..4b0d28d --- /dev/null +++ b/testsuite/uptime.test/uptime.exp @@ -0,0 +1,17 @@ +# +# Dejagnu tests for uptime - part of procps +# +set uptime "${topdir}src/uptime" + +set test "uptime" +spawn $uptime +expect_pass "$test" "^\\s+\\d{2}:\\d{2}:\\d{2} up (\\d+ days?,)?\\s*\\d+( min|:\\d+), +\\d+ users?, +load average: \[0-9.\]+, \[0-9.\]+, \[0-9.\]+\\s*$" + +set test "uptime since option" +spawn $uptime --since +expect_pass "$test" "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\s*$" + +set test "uptime pretty option" +spawn $uptime --pretty +expect_pass "$test" "up (\\d+ decades?, )?(\\d+ years?, )?(\\d+ weeks?, )?(\\d+ days?, )?(\\d+ hours?, )?(\\d+ minutes?)\\s*$" + |