aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bind.expect20
-rw-r--r--tests/bind.expect.out2
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/bind.expect b/tests/bind.expect
index 7589fa8e..7c594241 100644
--- a/tests/bind.expect
+++ b/tests/bind.expect
@@ -199,3 +199,23 @@ expect_prompt -re {\r\nmno pqrt\r\n} {
} unmatched {
puts stderr "emacs transpose words fail, 100ms timeout: long delay"
}
+
+# Verify special characters, such as \cV, are not intercepted by the kernel
+# tty driver. Rather, they can be bound and handled by fish.
+send "bind \\cV 'echo ctrl-v seen'\r"
+expect_prompt
+send "\026\r"
+expect_prompt -re {ctrl-v seen} {
+ puts "ctrl-v seen"
+} unmatched {
+ puts stderr "ctrl-v not seen"
+}
+
+send "bind \\cO 'echo ctrl-o seen'\r"
+expect_prompt
+send "\017\r"
+expect_prompt -re {ctrl-o seen} {
+ puts "ctrl-o seen"
+} unmatched {
+ puts stderr "ctrl-o not seen"
+}
diff --git a/tests/bind.expect.out b/tests/bind.expect.out
index f74d54b2..07f09fde 100644
--- a/tests/bind.expect.out
+++ b/tests/bind.expect.out
@@ -13,3 +13,5 @@ default-mode custom timeout set correctly
emacs transpose words, 100ms timeout: no delay
emacs transpose words, 100ms timeout: short delay
emacs transpose words, 100ms timeout: long delay
+ctrl-v seen
+ctrl-o seen