420cd9c7c2
For the test suite, procps used to use sleep which would just create a process or two to test the tools against. Some setups coreutils creates all programs including sleep into one blob which means a lot of the tests fail, see issue #2 procps has its own sleep program now.
23 lines
524 B
Plaintext
23 lines
524 B
Plaintext
|
|
make_testproc
|
|
|
|
set pwdx "${topdir}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
|