summaryrefslogtreecommitdiff
path: root/test/ripper/test_ripper.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-17 14:34:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-17 14:34:13 +0000
commitc4d77cb4adaae2bab9aa015c9a0528f0abf07bbd (patch)
tree54c9fd45bb99576b62ca63c98c05124123b1ed82 /test/ripper/test_ripper.rb
parent19c312afee311fe4a753e9440e01eb614c9fbf0e (diff)
* parse.y (parser_data_type): inherit the core type in ripper so
that checks in core would work. [ruby-core:39591] [Bug #5331] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper/test_ripper.rb')
-rw-r--r--test/ripper/test_ripper.rb49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/ripper/test_ripper.rb b/test/ripper/test_ripper.rb
new file mode 100644
index 0000000..72dc52d
--- /dev/null
+++ b/test/ripper/test_ripper.rb
@@ -0,0 +1,49 @@
+begin
+ require 'ripper'
+ require 'test/unit'
+ ripper_test = true
+ module TestRipper; end
+rescue LoadError
+end
+
+class TestRipper::Ripper < Test::Unit::TestCase
+
+ def setup
+ @ripper = Ripper.new '1 + 1'
+ end
+
+ def test_column
+ assert_nil @ripper.column
+ end
+
+ def test_encoding
+ assert_equal Encoding::US_ASCII, @ripper.encoding
+ end
+
+ def test_end_seen_eh
+ refute @ripper.end_seen?
+ end
+
+ def test_filename
+ assert_equal '(ripper)', @ripper.filename
+ end
+
+ def test_lineno
+ assert_nil @ripper.lineno
+ end
+
+ def test_parse
+ refute @ripper.parse
+ end
+
+ def test_yydebug
+ refute @ripper.yydebug
+ end
+
+ def test_yydebug_equals
+ @ripper.yydebug = true
+
+ assert @ripper.yydebug
+ end
+
+end if ripper_test