pstree: add test

Closes #26534.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>