aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/top.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/top.test b/tests/top.test
index 11eea33b..3c3b5977 100755
--- a/tests/top.test
+++ b/tests/top.test
@@ -5,3 +5,9 @@
#testing "name" "command" "result" "infile" "stdin"
testing "batch termination" "top -b -n1 | tail -c 1" "\n" "" ""
+testing "fractional seconds" "top -b -d 8.5 -n1 | tail -c 1" "\n" "" ""
+
+# These are unit tests of xparsetime.
+testing "-d invalid input" "top -b -d monkey -n1 2>&1 >/dev/null" "top: Not a number 'monkey'\n" "" ""
+testing "-d unknown suffix" "top -b -d 1u -n1 2>&1 >/dev/null" "top: Unknown suffix 'u'\n" "" ""
+testing "-d suffix trailing junk" "top -b -d 1monkey -n1 2>&1 >/dev/null" "top: Unknown suffix 'monkey'\n" "" ""