Skip to content

Commit

Permalink
[ruby/irb] Fix indent test for new reline
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng authored and artur-intech committed Apr 26, 2024
1 parent 4ad83c3 commit eed9daa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
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

0 comments on commit eed9daa

Please sign in to comment.