procps/testsuite/uptime.test/uptime.exp
Craig Small 0e6e79522b test for previous commit
Add a test routine to test for --since option added to uptime in
previous commit
2012-12-26 23:21:44 +11:00

13 lines
387 B
Plaintext

#
# Dejagnu tests for uptime - part of procps
#
set uptime "${topdir}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*$"