summaryrefslogtreecommitdiffstats
path: root/testsuite/pslog.test/pslog.exp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 13:17:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 13:17:26 +0000
commita4dc4fbcc1b131061dcccd5cdcc2395d9a2ba784 (patch)
treebc531e7e083fff1668bb4e79e9692d8cc47aea95 /testsuite/pslog.test/pslog.exp
parentInitial commit. (diff)
downloadpsmisc-a4dc4fbcc1b131061dcccd5cdcc2395d9a2ba784.tar.xz
psmisc-a4dc4fbcc1b131061dcccd5cdcc2395d9a2ba784.zip
Adding upstream version 23.7.upstream/23.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--testsuite/pslog.test/pslog.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/pslog.test/pslog.exp b/testsuite/pslog.test/pslog.exp
new file mode 100644
index 0000000..b8d0e01
--- /dev/null
+++ b/testsuite/pslog.test/pslog.exp
@@ -0,0 +1,19 @@
+#
+# Testsuite for pslog
+#
+
+set pslog "${topdir}src/pslog"
+set fake_pid "27000"
+
+set test "pslog with no arguments"
+spawn $pslog
+expect_pass "$test" "^Usage: pslog PID\\.\\.\\."
+
+set test "pslog pid not found"
+if { [ file exists "/proc/$fake_pid" ] } {
+ untested "$test (PID exists)"
+} else {
+ spawn $pslog ${fake_pid}
+ expect_pass "$test" "opendir: No such file or directory"
+}
+