add a fail case, that anoyingly hangs
This commit is contained in:
parent
88a26414eb
commit
f60bbfa9ca
26
test/parser/test_fails.rb
Normal file
26
test/parser/test_fails.rb
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
require_relative "helper"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
@string_input = <<HERE
|
||||||
|
class Foo
|
||||||
|
def bar
|
||||||
|
4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
HERE
|
||||||
|
@parse_output = nil
|
||||||
|
@transform_output = nil
|
||||||
|
@parser = @parser.root
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user