diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/uptime.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/uptime.test b/tests/uptime.test new file mode 100644 index 00000000..df65cd06 --- /dev/null +++ b/tests/uptime.test @@ -0,0 +1,10 @@ +#!/bin/bash + +[ -f testing.sh ] && . testing.sh + +#testing "name" "command" "result" "infile" "stdin" + +testing "uptime" "uptime | grep -q 'load average:' && echo t" "t\n" "" "" +testing "uptime -s" \ + "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" \ + "t\n" "" "" |