aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-10-16 12:10:53 -0500
committerRob Landley <rob@landley.net>2019-10-16 12:10:53 -0500
commit275c0a97f7adfe6705702aedaf1bc0e9fbe19f97 (patch)
treecabb264516939db05186638ecc6d366bbafd7d7f
parent89a8d00e470f1999a62ceea81269af2f39c655ba (diff)
downloadtoybox-275c0a97f7adfe6705702aedaf1bc0e9fbe19f97.tar.gz
Simple ps smoketest.
-rwxr-xr-xtests/ps.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ps.test b/tests/ps.test
new file mode 100755
index 00000000..e14336ff
--- /dev/null
+++ b/tests/ps.test
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+[ -f testing.sh ] && . testing.sh
+
+#testing "name" "command" "result" "infile" "stdin"
+
+ln -s "$(which sleep)" xiphoid
+(./xiphoid 5 & echo $! > pid.txt)
+ID=$(cat pid.txt)
+NOSPACE=1 testing "" "ps -o pid $ID" "PID\n$ID\n" "" ""
+kill "$ID"