diff options
Diffstat (limited to 'test.rb')
-rwxr-xr-x | test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test.rb b/test.rb new file mode 100755 index 000000000000..d63e5374639b --- /dev/null +++ b/test.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +require File.join('test', 'unit') +require 'ruby_parser' + +# Check whether ruby_parser functions correctly. +class TestRubyParser < Test::Unit::TestCase + # Run a simple command taken from the ruby_parser README. + def test_from_readme + assert_equal( + RubyParser.new.parse("1+1").to_s, + 's(:call, s(:lit, 1), :+, s(:lit, 1))' + ) + end +end |