mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Add a test for the indent fix
This commit is contained in:
parent
46625b9a22
commit
df1b193eba
@ -2272,6 +2272,17 @@ describe "TextEditor", ->
|
||||
expect(editor.indentationForBufferRow(1)).toBe 1
|
||||
expect(editor.indentationForBufferRow(2)).toBe 0
|
||||
|
||||
it "indents the new line to the current level when editor.autoIndent is true and no increaseIndentPattern is specified", ->
|
||||
runs ->
|
||||
atom.config.set("editor.autoIndent", true)
|
||||
editor.setGrammar(atom.grammars.selectGrammar("file"))
|
||||
editor.setText(' if true')
|
||||
editor.setCursorBufferPosition([0, 8])
|
||||
editor.insertNewline()
|
||||
expect(editor.getGrammar()).toBe atom.grammars.nullGrammar
|
||||
expect(editor.indentationForBufferRow(0)).toBe 1
|
||||
expect(editor.indentationForBufferRow(1)).toBe 1
|
||||
|
||||
it "indents the new line to the correct level when editor.autoIndent is true and using a off-side rule language", ->
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage('language-coffee-script')
|
||||
|
Loading…
Reference in New Issue
Block a user