aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"