10000 Add yamatanooroti rendering test · ruby/reline@f092519 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit f092519

Browse files
committed
Add yamatanooroti rendering test
1 parent bce7e75 commit f092519

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENCODING_LIST.each_pair do |task_name, encoding|
1515
t.libs << 'test'
1616
t.libs << 'lib'
1717
t.loader = :direct
18-
t.pattern = 'test/reline/**/test_*.rb'
18+
t.pattern = 'test/reline/test_*.rb'
1919
end
2020
end
2121

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
begin
2+
require 'yamatanooroti'
3+
4+
class Yamatanooroti::TestMultiplatform < Yamatanooroti::TestCase
5+
def setup
6+
inputrc_backup = ENV['INPUTRC']
7+
ENV['INPUTRC'] = 'nonexistent_file'
8+
start_terminal(5, 30, %w{ruby -Ilib bin/multiline_repl})
9+
sleep 0.5
10+
ENV['INPUTRC'] = inputrc_backup
11+
end
12+
13+
def test_history_back
14+
write(":a\n")
15+
write("\C-p")
16+
close
17+
assert_screen(<<~EOC)
18+
Multiline REPL.
19+
prompt> :a
20+
=> :a
21+
prompt> :a
22+
EOC
23+
end
24+
25+
def test_backspace
26+
write(":abc\C-h\n")
27+
close
28+
assert_screen(<<~EOC)
29+
Multiline REPL.
30+
prompt> :ab
31+
=> :ab
32+
prompt>
33+
EOC
34+
end
35+
end
36+
rescue LoadError, NameError # yamatanooroti gem not found
37+
end

0 commit comments

Comments
 (0)
0