uptime.test 339 B

12345678910
  1. #!/bin/bash
  2. [ -f testing.sh ] && . testing.sh
  3. #testing "name" "command" "result" "infile" "stdin"
  4. testing "uptime" "uptime | grep -q 'load average:' && echo t" "t\n" "" ""
  5. testing "uptime -s" \
  6. "uptime -s | grep -q '^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]$' && echo t" \
  7. "t\n" "" ""