Project

General

Profile

Bug #5802

0 assretions in test/readline/test_readline.rb:test_line_buffer__point

Added by no6v (Nobuhiro IMAI) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0dev (2011-12-23 trunk 34110) [x86_64-linux]
Backport:
[ruby-dev:45042]

Description

=begin
test/readline/test_readline.rb の test_line_buffer__point を実行しても、
一つも assertion が実行されていません。Readline.completion_proc に指定した
proc から return しているので、そこでテストケースから抜けているようです。

$ ruby test/readline/test_readline.rb -n test_line_buffer_point -v
Run options: -n test_line_buffer
_point -v

# Running tests:

TestReadline#test_line_buffer__point = 0.00 s = .

Finished tests in 0.001841s, 543.1459 tests/s, 0.0000 assertions/s.

1 tests, 0 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2011-12-23 trunk 34110) [x86_64-linux]

ついでに、

$ ruby -cw test/readline/test_readline.rb
test/readline/test_readline.rb:142: warning: assigned but unused variable - actual_buffer_line
test/readline/test_readline.rb:150: warning: assigned but unused variable - line
Syntax OK

という感じなので修正するパッチを添付します。

この修正により、Readline.completion_append_character の状態によって
テストが通ったり通らなかったりするようになるので、" " と nil の場合をどちらも
テストするようにしてみたパッチも添付します。

コミットログが長くてファイル名が中途半端ですみません。
=end


Files

Associated revisions

Revision 83971343
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34115
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Revision 34115
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Revision 34115
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Revision 34115
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Revision 34115
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Revision 34115
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Revision 54209dd1
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 34115:

    * test/readline/test_readline.rb (test_line_buffer__point): use
      lambda not to exit entire method by "return".  or "next" for
      proc.  [ruby-dev:45042] [Bug #5802]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

#1

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34115.
Nobuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • test/readline/test_readline.rb (test_line_buffer__point): use lambda not to exit entire method by "return". or "next" for proc. [ruby-dev:45042] [Bug #5802]

Also available in: Atom PDF