Skip to content

Commit 7c16ce0

Browse files
authored
Fix indent test for new reline (#908)
1 parent 89bca01 commit 7c16ce0

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

test/irb/test_irb.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,8 @@ def test_empty_input_echoing_behaviour
7070
type "exit"
7171
end
7272

73-
# Input cramped together due to how Reline's Reline::GeneralIO works
74-
assert_include(
75-
output,
76-
"irb(main):001> irb(main):002> irb(main):002> irb(main):002> => nil\r\n"
77-
)
73+
assert_not_match(/irb\(main\):001> (\r*\n)?=> nil/, output)
74+
assert_match(/irb\(main\):002> (\r*\n)?=> nil/, output)
7875
end
7976
end
8077

test/irb/yamatanooroti/test_rendering.rb

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def b; true; end
137137
a
138138
.a
139139
.b
140+
.itself
140141
EOC
141142
close
142143
assert_screen(<<~EOC)
@@ -153,9 +154,10 @@ def b; true; end
153154
irb(main):008>
154155
irb(main):009> a
155156
irb(main):010> .a
156-
irb(main):011> .b
157+
irb(main):011> .b
158+
irb(main):012> .itself
157159
=> true
158-
irb(main):012>
160+
irb(main):013>
159161
EOC
160162
end
161163

@@ -181,7 +183,6 @@ def c; true; end
181183
(a)
182184
&.b()
183185
184-
185186
class A def b; self; end; def c; true; end; end;
186187
a = A.new
187188
a
@@ -190,6 +191,7 @@ class A def b; self; end; def c; true; end; end;
190191
.c
191192
(a)
192193
&.b()
194+
.itself
193195
EOC
194196
close
195197
assert_screen(<<~EOC)
@@ -214,17 +216,17 @@ class A def b; self; end; def c; true; end; end;
214216
irb(main):015> &.b()
215217
=> #<A>
216218
irb(main):016>
217-
irb(main):017>
218-
irb(main):018> class A def b; self; end; def c; true; end; end;
219-
irb(main):019> a = A.new
219+
irb(main):017> class A def b; self; end; def c; true; end; end;
220+
irb(main):018> a = A.new
220221
=> #<A>
221-
irb(main):020> a
222-
irb(main):021> .b
223-
irb(main):022> # aaa
224-
irb(main):023> .c
222+
irb(main):019> a
223+
irb(main):020> .b
224+
irb(main):021> # aaa
225+
irb(main):022> .c
225226
=> true
226-
irb(main):024> (a)
227-
irb(main):025> &.b()
227+
irb(main):023> (a)
228+
irb(main):024> &.b()
229+
irb(main):025> .itself
228230
=> #<A>
229231
irb(main):026>
230232
EOC

0 commit comments

Comments
 (0)