soml-parser/test/unit/test_fails.rb

27 lines
594 B
Ruby
Raw Normal View History

2014-06-26 10:55:49 +02:00
require_relative "../parser_helper"
2014-06-04 18:56:50 +02:00
# some cases that fail, and fail badly.
# These make the parse "hang", ie there is some looping going on in the parser, but not straight down, as theey don't
# throw even StackError
# Annoyingly, the user error is quite small, a missing bracket or things
class TestFails < MiniTest::Test
# include the magic (setup and parse -> test method translation), see there
include ParserHelper
def test_fail_function
2015-08-28 22:37:25 +02:00
@input = <<HERE
2014-06-04 18:56:50 +02:00
class Foo
def bar
4
end
end
HERE
@parse_output = nil
2015-08-28 22:37:25 +02:00
@output = nil
@root = :root
2014-06-04 18:56:50 +02:00
end
end