procps/testsuite/uptime.test/uptime.exp
2022-08-29 19:13:10 +10:00

13 lines
391 B
Plaintext

#
# 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*$"