From e3be059d4da38aa36f1aee1d56f8ceb943d92f1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 22:34:44 +0200 Subject: Adding upstream version 2:4.0.4. Signed-off-by: Daniel Baumann --- testsuite/pwdx.test/pwdx.exp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 testsuite/pwdx.test/pwdx.exp (limited to 'testsuite/pwdx.test') diff --git a/testsuite/pwdx.test/pwdx.exp b/testsuite/pwdx.test/pwdx.exp new file mode 100644 index 0000000..2f71cbd --- /dev/null +++ b/testsuite/pwdx.test/pwdx.exp @@ -0,0 +1,22 @@ + +make_testproc + +set pwdx "${topdir}src/pwdx" +# Run pwdx with no arguments +set test "pwdx no args" +spawn $pwdx +expect_pass "$test" "^\\s*Usage:\\s+\(lt-\)\?pwdx \\\[options\\\] pid\.\.\." + +# Run pwdx with pid 0 which is invalid +set test "pwdx pid 0 should be invalid" +spawn $pwdx 0 +expect_pass "$test" "\(lt-\)\?pwdx\: invalid process id\: 0" + +# Run pwdx with existing pid +set test "pwdx find test process cwd" +set my_pwd [ pwd ] +spawn $pwdx $testproc1_pid +expect_pass "$test" "^$testproc1_pid: $my_pwd" + +# Cleanup +kill_testproc -- cgit v1.2.3