Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions test/irb/test_irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,8 @@ def test_empty_input_echoing_behaviour
type "exit"
end

# Input cramped together due to how Reline's Reline::GeneralIO works
assert_include(
output,
"irb(main):001> irb(main):002> irb(main):002> irb(main):002> => nil\r\n"
)
assert_not_match(/irb\(main\):001> (\r*\n)?=> nil/, output)
assert_match(/irb\(main\):002> (\r*\n)?=> nil/, output)
end
end

Expand Down
26 changes: 14 additions & 12 deletions test/irb/yamatanooroti/test_rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def b; true; end
a
.a
.b
.itself
EOC
close
assert_screen(<<~EOC)
Expand All @@ -153,9 +154,10 @@ def b; true; end
irb(main):008>
irb(main):009> a
irb(main):010> .a
irb(main):011> .b
irb(main):011> .b
irb(main):012> .itself
=> true
irb(main):012>
irb(main):013>
EOC
end

Expand All @@ -181,7 +183,6 @@ def c; true; end
(a)
&.b()


class A def b; self; end; def c; true; end; end;
a = A.new
a
Expand All @@ -190,6 +191,7 @@ class A def b; self; end; def c; true; end; end;
.c
(a)
&.b()
.itself
EOC
close
assert_screen(<<~EOC)
Expand All @@ -214,17 +216,17 @@ class A def b; self; end; def c; true; end; end;
irb(main):015> &.b()
=> #<A>
irb(main):016>
irb(main):017>
irb(main):018> class A def b; self; end; def c; true; end; end;
irb(main):019> a = A.new
irb(main):017> class A def b; self; end; def c; true; end; end;
irb(main):018> a = A.new
=> #<A>
irb(main):020> a
irb(main):021> .b
irb(main):022> # aaa
irb(main):023> .c
irb(main):019> a
irb(main):020> .b
irb(main):021> # aaa
irb(main):022> .c
=> true
irb(main):024> (a)
irb(main):025> &.b()
irb(main):023> (a)
irb(main):024> &.b()
irb(main):025> .itself
=> #<A>
irb(main):026>
EOC
Expand Down