Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ReVIEW::Preprocessor::Strip; not used now #1305

Merged
merged 1 commit into from
May 25, 2019
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
22 changes: 0 additions & 22 deletions lib/review/preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,6 @@ def lineno
class Preprocessor
include ErrorUtils

class Strip
def initialize(f)
@f = f
end

def path
@f.path
end

def lineno
@f.lineno
end

def gets
@f.each_line do |line|
return "\#@\#\n" if /\A\#@/ =~ line
return line
end
nil
end
end

def initialize(repo, param)
@repository = repo
@config = param
Expand Down
18 changes: 2 additions & 16 deletions test/test_preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@
require 'review/preprocessor'
require 'stringio'

class PreprocessorStripTest < Test::Unit::TestCase
class PreprocessorTest < Test::Unit::TestCase
include ReVIEW

def test_gets
f = StringIO.new '= Header'
s = Preprocessor::Strip.new(f)
expect = '= Header'
actual = s.gets
assert_equal expect, actual
end

def test_gets_with_comment
f = StringIO.new '#@warn(write it later)'
s = Preprocessor::Strip.new(f)
expect = '#@#' + "\n"
actual = s.gets
assert_equal expect, actual
end
## TODO: add tests
end