summaryrefslogtreecommitdiff
path: root/test/lib/completions/renice.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/completions/renice.exp')
-rw-r--r--test/lib/completions/renice.exp42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/lib/completions/renice.exp b/test/lib/completions/renice.exp
new file mode 100644
index 00000000..c91e0212
--- /dev/null
+++ b/test/lib/completions/renice.exp
@@ -0,0 +1,42 @@
+proc setup {} {
+ save_env
+}; # setup()
+
+
+proc teardown {} {
+ assert_env_unmodified
+}; # teardown()
+
+
+setup
+
+
+set test "Tab should show complete process ids"
+ # Try completion
+set cmd "renice 1"
+send "$cmd\t"
+expect {
+ -re "$cmd\r\n\\d+.*/@$cmd$" { pass "$test" }
+ -re /@ { unresolved "$test at prompt" }
+ -re eof { unresolved "eof" }
+}; # expect
+
+
+sync_after_int
+
+
+set test "Tab should show complete process group ids"
+ # Try completion
+set cmd "renice -g "
+send "$cmd\t"
+expect {
+ -re "$cmd\r\n\\d+.*/@$cmd$" { pass "$test" }
+ -re /@ { unresolved "$test at prompt" }
+ -re eof { unresolved "eof" }
+}; # expect
+
+
+sync_after_int
+
+
+teardown