summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-30 13:25:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-30 13:25:28 +0000
commitffe920d674857087037327dc4075cd0c7e8e9fd1 (patch)
tree58abf42e8e09908fae8a7779b08b1b897701d7bd /test/ripper
parentd7b32ffd64cb4248e325732c0e0430c65cddef24 (diff)
parse.y: separate ripper data type
* parse.y (parser_data_type): separate ripper data type for from parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_ripper.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/ripper/test_ripper.rb b/test/ripper/test_ripper.rb
index b582de5..0b50bee 100644
--- a/test/ripper/test_ripper.rb
+++ b/test/ripper/test_ripper.rb
@@ -18,10 +18,17 @@ class TestRipper::Ripper < Test::Unit::TestCase
def test_encoding
assert_equal Encoding::UTF_8, @ripper.encoding
+ ripper = Ripper.new('# coding: iso-8859-15')
+ ripper.parse
+ assert_equal Encoding::ISO_8859_15, ripper.encoding
end
def test_end_seen_eh
- refute @ripper.end_seen?
+ @ripper.parse
+ assert_not_predicate @ripper, :end_seen?
+ ripper = Ripper.new('__END__')
+ ripper.parse
+ assert_predicate ripper, :end_seen?
end
def test_filename
@@ -37,17 +44,17 @@ class TestRipper::Ripper < Test::Unit::TestCase
end
def test_parse
- refute @ripper.parse
+ assert_nil @ripper.parse
end
def test_yydebug
- refute @ripper.yydebug
+ assert_not_predicate @ripper, :yydebug
end
def test_yydebug_equals
@ripper.yydebug = true
- assert @ripper.yydebug
+ assert_predicate @ripper, :yydebug
end
end if ripper_test