mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Store foldEndPattern in syntax global's scoped properties
There's a slight wrinkle in this commit… TextMate grammars sometimes store the `foldStopMarker` directly in the grammar, rather than storing it in a separate scoped preferences file like the other settings. So we have to scan through grammars looking for those that have the fold end marker and make a scoped property for that grammar's scope.
This commit is contained in:
@@ -2,14 +2,6 @@ fs = require('fs')
|
||||
TextMateBundle = require 'text-mate-bundle'
|
||||
|
||||
describe "TextMateBundle", ->
|
||||
describe ".getPreferenceInScope(scope, preferenceName)", ->
|
||||
it "returns the preference by the given name in the given scope or undefined if there isn't one", ->
|
||||
expect(TextMateBundle.getPreferenceInScope('source.coffee', 'decreaseIndentPattern')).toBe '^\\s*(\\}|\\]|else|catch|finally)$'
|
||||
expect(TextMateBundle.getPreferenceInScope('source.coffee', 'shellVariables')).toBeDefined()
|
||||
|
||||
it "returns the preference by the given name in the given scope for a scope registered via a comma-separated list of scopes", ->
|
||||
expect(TextMateBundle.getPreferenceInScope('source.objc++', 'shellVariables')).toBeDefined()
|
||||
|
||||
describe ".getPreferencesByScopeSelector()", ->
|
||||
it "logs warning, but does not raise errors if a preference can't be parsed", ->
|
||||
bundlePath = fs.join(require.resolve('fixtures'), "test.tmbundle")
|
||||
|
||||
Reference in New Issue
Block a user