summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-09-21 03:07:45 +0400
committerIgor Murzov <e-mail@date.by>2011-09-26 02:59:14 +0400
commitc7b9d08d171baa782bbb56ff142ea8572eecc778 (patch)
treedeb8230758d2bb1d25a419813ddd39b89cb58fc3 /test
parenta1b8148d234f5a49d8da28977387e0463ce349ed (diff)
downloadbash-completion-c7b9d08d171baa782bbb56ff142ea8572eecc778.tar.gz
feh: New completion.
NB: feh should be compiled with `make help=1`. Otherwise `feh --help` will not print help message, and option completion will not work.
Diffstat (limited to 'test')
-rw-r--r--test/completion/feh.exp1
-rw-r--r--test/lib/completions/feh.exp55
2 files changed, 56 insertions, 0 deletions
diff --git a/test/completion/feh.exp b/test/completion/feh.exp
new file mode 100644
index 00000000..4613bfaf
--- /dev/null
+++ b/test/completion/feh.exp
@@ -0,0 +1 @@
+assert_source_completions feh
diff --git a/test/lib/completions/feh.exp b/test/lib/completions/feh.exp
new file mode 100644
index 00000000..129e1f4d
--- /dev/null
+++ b/test/lib/completions/feh.exp
@@ -0,0 +1,55 @@
+proc setup {} {
+ save_env
+}
+
+
+proc teardown {} {
+ assert_env_unmodified
+}
+
+
+setup
+
+
+assert_complete_any "feh "
+
+
+sync_after_int
+
+
+set test "--lis<TAB> should complete \"--list\""
+assert_complete "--list" "feh --lis" $test
+
+
+sync_after_int
+
+
+set test "-S pix<TAB> should complete \"pixels\""
+assert_complete "pixels" "feh -S pix" $test
+
+
+sync_after_int
+
+
+set test "--zoom ma<TAB> should complete \"max\""
+assert_complete "max" "feh --zoom ma" $test
+
+
+sync_after_int
+
+
+set test "-g 640<TAB> should complete digits plus \"x\""
+assert_complete "0 1 2 3 4 5 6 7 8 9 x" "feh -g 640" $test
+
+
+sync_after_int
+
+
+set test "-g 640x48<TAB> should complete digits"
+assert_complete "0 1 2 3 4 5 6 7 8 9" "feh -g 640x48" $test
+
+
+sync_after_int
+
+
+teardown