Skip to content

Commit

Permalink
remove ReVIEW::Preprocessor::Strip; not used now
Browse files Browse the repository at this point in the history
related: #1257, #1261
  • Loading branch information
takahashim committed May 24, 2019
1 parent ce98a09 commit 636b8ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
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
16 changes: 1 addition & 15 deletions test/test_preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,5 @@
class PreprocessorStripTest < 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

0 comments on commit 636b8ba

Please sign in to comment.