summaryrefslogtreecommitdiff
path: root/test/test_highline.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_highline.rb')
-rwxr-xr-xtest/test_highline.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_highline.rb b/test/test_highline.rb
index 09b402c..94ab060 100755
--- a/test/test_highline.rb
+++ b/test/test_highline.rb
@@ -332,7 +332,9 @@ class TestHighLine < Minitest::Test
q.echo = "*"
end
assert_equal("", answer)
- assert_equal("apple".size, @output.string.count("\b"))
+
+ # There's only enough backspaces to clear the given string
+ assert_equal(5, @output.string.count("\b"))
end
def test_after_some_chars_backspace_does_not_enter_prompt_when_utf8
@@ -342,7 +344,9 @@ class TestHighLine < Minitest::Test
q.echo = "*"
end
assert_equal("", answer)
- assert_equal("maçã".size, @output.string.count("\b"))
+
+ # There's only enough backspaces to clear the given string
+ assert_equal(4, @output.string.count("\b"))
end
def test_readline_mode