Permalink
Browse files

TEST - found repro for bad parse-error-location

  • Loading branch information...
Shane Delamore Shane Delamore
Shane Delamore authored and Shane Delamore committed Nov 28, 2017
1 parent c45d843 commit c707fa03fc356e56774568186f61ac5948a085c9
Showing with 20 additions and 0 deletions.
  1. +19 −0 test/tests/CaffeineScript/ParseFailure.coffee
  2. +1 −0 test/tests/CaffeineScript/index.coffee
@@ -0,0 +1,19 @@
{CaffeineScript} = Neptune
{isNumber, each, object, array, isArray, log, formattedInspect, isPlainObject, merge, object, stringCount, isString} = Neptune.Art.StandardLib
{CaffeineScriptParser} = CaffeineScript
module.exports = suite:
regressions: ->
skipKnownFailingTest "failure position with nested blocks", ->
source = """
-> -> # <-- remove one of the "->" and the output is correct
-> # <-- known-failing puts the parse-failure line here
123
( # <-- failure should be just before the (
"""
parser = new CaffeineScriptParser
assert.rejects -> parser.parse source
.then (rejectsWith) ->
assert.eq 4, rejectsWith.info.line
@@ -8,4 +8,5 @@ module.exports
Helper: require './Helper'
Lib: require './Lib'
OperatorHelper: require './OperatorHelper'
ParseFailure: require './ParseFailure'
require './Parser'

0 comments on commit c707fa0

Please sign in to comment.