aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-04-28 21:12:58 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-04-28 21:12:58 -0700
commit5092904ea3a95c6ba78350c3b3761511f613fde8 (patch)
tree4767ec61f0c748ae17d5aadda35f43e0ac0af5f6 /tests
parent3e24ae80b3739ded7d4066349fc87d13f2b70727 (diff)
fix bind unit tests
In my rush to get the fix for the wrong default Vi mode escape delay merged (commit 3e24ae80b3739ded7d4066349fc87d13f2b70727) I neglected to update the unit test. This change corrects that oversight.
Diffstat (limited to 'tests')
-rw-r--r--tests/bind.expect20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/bind.expect b/tests/bind.expect
index 3d49f288..7589fa8e 100644
--- a/tests/bind.expect
+++ b/tests/bind.expect
@@ -60,7 +60,7 @@ expect_prompt -re {\r\nsuccess: default escape timeout\r\n} {
# Verify the default timeout has been set to the expected value.
send "echo fish_escape_delay_ms=\$fish_escape_delay_ms\r"
-expect_prompt -re {\r\nfish_escape_delay_ms=10\r\n} {
+expect_prompt -re {\r\nfish_escape_delay_ms=100\r\n} {
puts "vi-mode default timeout set correctly"
} unmatched {
puts stderr "vi-mode default timeout not set correctly"
@@ -71,7 +71,7 @@ send "\033"
# Delay needed to allow fish to transition to vi "normal" mode. The delay is
# longer than strictly necessary to let fish catch up as it may be slow due to
# ASAN.
-sleep 0.100
+sleep 0.150
send "ddi"
send "echo success: default escape timeout\r"
expect_prompt -re {\r\nsuccess: default escape timeout\r\n} {
@@ -84,7 +84,7 @@ expect_prompt -re {\r\nsuccess: default escape timeout\r\n} {
# binding but should be valid while in vi insert or normal mode).
send "echo abc def"
send "\033"
-sleep 0.005
+sleep 0.010
send "t\r"
expect_prompt -re {\r\ndef abc\r\n} {
puts "vi transpose words, default timeout: short delay"
@@ -96,7 +96,7 @@ expect_prompt -re {\r\ndef abc\r\n} {
send "echo TEXT"
send "\033"
# Delay needed to allow fish to transition to vi "normal" mode.
-sleep 0.100
+sleep 0.150
send "hhrAi\r"
expect_prompt -re {\r\nTAXT\r\n} {
puts "vi mode replace char, default timeout: long delay"
@@ -105,7 +105,7 @@ expect_prompt -re {\r\nTAXT\r\n} {
}
# Verify that changing the escape timeout has an effect.
-send "set -g fish_escape_delay_ms 100\r"
+send "set -g fish_escape_delay_ms 200\r"
expect_prompt
send "echo fail: lengthened escape timeout"
@@ -123,7 +123,7 @@ expect_prompt -re {\r\nsuccess: lengthened escape timeout\r\n} {
# after sending escape.
send "echo fail: no normal mode"
send "\033"
-sleep 0.050
+sleep 0.100
send "ddi"
send "inserted\r"
expect_prompt -re {\r\nfail: no normal modediinserted\r\n} {
@@ -151,14 +151,18 @@ expect_prompt -re {\r\nTENT\r\n} {
send "set -g fish_key_bindings fish_default_key_bindings\r"
expect_prompt
-# Verify the custom escape timeout of 100ms set earlier is still in effect.
+# Verify the custom escape timeout of 200ms set earlier is still in effect.
send "echo fish_escape_delay_ms=\$fish_escape_delay_ms\r"
-expect_prompt -re {\r\nfish_escape_delay_ms=100\r\n} {
+expect_prompt -re {\r\nfish_escape_delay_ms=200\r\n} {
puts "default-mode custom timeout set correctly"
} unmatched {
puts stderr "default-mode custom timeout not set correctly"
}
+# Reset it to 100ms.
+send "set -g fish_escape_delay_ms 100\r"
+expect_prompt
+
# Verify the emacs transpose word (\et) behavior using various delays,
# including none, after the escape character.