mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/readline/test_readline_history.rb
(Readline::TestHistory#test_each): checked return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c3eecb35d8
commit
b043284bfe
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Sep 23 02:07:52 2008 TAKAO Kouji <kouji@takao7.net>
|
||||||
|
|
||||||
|
* test/readline/test_readline_history.rb
|
||||||
|
(Readline::TestHistory#test_each): checked return value.
|
||||||
|
|
||||||
Tue Sep 23 02:05:34 2008 TAKAO Kouji <kouji@takao7.net>
|
Tue Sep 23 02:05:34 2008 TAKAO Kouji <kouji@takao7.net>
|
||||||
|
|
||||||
* ext/readline/readline.c (Init_readline): used remove_history to
|
* ext/readline/readline.c (Init_readline): used remove_history to
|
||||||
|
|
|
@ -205,16 +205,18 @@ class Readline::TestHistory < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_each
|
def test_each
|
||||||
HISTORY.each do |s|
|
e = HISTORY.each do |s|
|
||||||
assert(false) # not reachable
|
assert(false) # not reachable
|
||||||
end
|
end
|
||||||
|
assert_equal(HISTORY, e)
|
||||||
lines = push_history(5)
|
lines = push_history(5)
|
||||||
i = 0
|
i = 0
|
||||||
HISTORY.each do |s|
|
e = HISTORY.each do |s|
|
||||||
assert_equal(HISTORY[i], s)
|
assert_equal(HISTORY[i], s)
|
||||||
assert_equal(lines[i], s)
|
assert_equal(lines[i], s)
|
||||||
i += 1
|
i += 1
|
||||||
end
|
end
|
||||||
|
assert_equal(HISTORY, e)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_each__enumerator
|
def test_each__enumerator
|
||||||
|
|
Loading…
Reference in a new issue