Merge pull request #5044 from russlescai/rl-scoped-file-encoding

Allow scoped default File Encoding
Esse commit está contido em:
Kevin Sawicki
2015-01-21 11:22:17 -08:00
3 arquivos alterados com 21 adições e 2 exclusões
+19
Ver Arquivo
@@ -155,6 +155,25 @@ describe "TextEditor", ->
expect(editor2.getSoftTabs()).toBe true
expect(editor2.getEncoding()).toBe 'macroman'
it "uses scoped `core.fileEncoding` values", ->
editor1 = null
editor2 = null
atom.config.set('core.fileEncoding', 'utf16le')
atom.config.set('core.fileEncoding', 'macroman', scopeSelector: '.js')
waitsForPromise ->
atom.workspace.open('a').then (o) -> editor1 = o
runs ->
expect(editor1.getEncoding()).toBe 'utf16le'
waitsForPromise ->
atom.workspace.open('test.js').then (o) -> editor2 = o
runs ->
expect(editor2.getEncoding()).toBe 'macroman'
describe "title", ->
describe ".getTitle()", ->
it "uses the basename of the buffer's path as its title, or 'untitled' if the path is undefined", ->