adobe/brackets — pull request #2376 by njx (2012-12-17 20:57:15+00:00)
Title: Unit tests for CSSUtils.getInfoFromPos()

@jasonsanjose @redmunds

These are the unit tests for the new `CSSUtils.getInfoFromPos()` API. There's currently one failing test, filed as #2375.

As part of this, I fixed a bug in the offset-parsing code in SpecRunnerUtils, which wasn't properly handling cases like `{{{14}}` (which should be treated like a single literal brace followed by offset 14). There seemed to be something in the regular expression for the offset-parsing that was trying to detect a backslash before the `{{`, but I don't think that was actually being used, since the code that matches the regular expression would only ever call it when the current index was already at the beginning of a `{{`. Removing this didn't seem to break any of the existing tests; if we do want a way to backslashify the offset braces, we'll need to implement it some other way.