xref: /aosp_15_r20/external/toybox/tests/uptime.test (revision cf5a6c84e2b8763fc1a7db14496fd4742913b199)
1#!/bin/bash
2
3[ -f testing.sh ] && . testing.sh
4
5#testing "name" "command" "result" "infile" "stdin"
6
7testing "uptime" "uptime | grep -q 'load average:' && echo t" "t\n" "" ""
8testing "uptime -s" \
9        "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" \
10        "t\n" "" ""
11