mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
💄
This commit is contained in:
@@ -641,7 +641,7 @@ describe 'Buffer', ->
|
||||
expect(ranges[1]).toEqual [[6,6], [6,13]]
|
||||
|
||||
describe ".characterIndexForPosition(position)", ->
|
||||
it "returns the total number of charachters that precede the given position", ->
|
||||
it "returns the total number of characters that precede the given position", ->
|
||||
expect(buffer.characterIndexForPosition([0, 0])).toBe 0
|
||||
expect(buffer.characterIndexForPosition([0, 1])).toBe 1
|
||||
expect(buffer.characterIndexForPosition([0, 29])).toBe 29
|
||||
@@ -650,7 +650,7 @@ describe 'Buffer', ->
|
||||
expect(buffer.characterIndexForPosition([12, 2])).toBe 408
|
||||
|
||||
describe ".positionForCharacterIndex(position)", ->
|
||||
it "returns the position based on charachter index", ->
|
||||
it "returns the position based on character index", ->
|
||||
expect(buffer.positionForCharacterIndex(0)).toEqual [0, 0]
|
||||
expect(buffer.positionForCharacterIndex(1)).toEqual [0, 1]
|
||||
expect(buffer.positionForCharacterIndex(29)).toEqual [0, 29]
|
||||
|
||||
@@ -23,12 +23,12 @@ describe "LanguageMode", ->
|
||||
beforeEach ->
|
||||
editSession.buffer.setText("")
|
||||
|
||||
describe "when more than one charachter is inserted", ->
|
||||
describe "when more than one character is inserted", ->
|
||||
it "does not insert a matching bracket", ->
|
||||
editSession.insertText("woah(")
|
||||
expect(editSession.buffer.getText()).toBe "woah("
|
||||
|
||||
describe "when there is a word charachter after the cursor", ->
|
||||
describe "when there is a word character after the cursor", ->
|
||||
it "does not insert a matching bracket", ->
|
||||
editSession.buffer.setText("ab")
|
||||
editSession.setCursorBufferPosition([0, 1])
|
||||
@@ -47,7 +47,7 @@ describe "LanguageMode", ->
|
||||
|
||||
expect(editSession.buffer.getText()).toBe "())\na)b\n[)]\n1)2"
|
||||
|
||||
describe "when there is a non-word characher after the cursor", ->
|
||||
describe "when there is a non-word character after the cursor", ->
|
||||
it "inserts a closing bracket after an opening bracket is inserted", ->
|
||||
editSession.buffer.setText("}")
|
||||
editSession.setCursorBufferPosition([0, 0])
|
||||
@@ -146,7 +146,7 @@ describe "LanguageMode", ->
|
||||
expect(editSession.getCursorBufferPosition()).toEqual [0, 4]
|
||||
|
||||
describe "when inserting a quote", ->
|
||||
describe "when a word charachter is before the cursor", ->
|
||||
describe "when a word character is before the cursor", ->
|
||||
it "does not automatically insert closing quote", ->
|
||||
editSession.buffer.setText("abc")
|
||||
editSession.setCursorBufferPosition([0, 3])
|
||||
@@ -158,7 +158,7 @@ describe "LanguageMode", ->
|
||||
editSession.insertText '\''
|
||||
expect(buffer.lineForRow(0)).toBe "abc\'"
|
||||
|
||||
describe "when a non word charachter is before the cursor", ->
|
||||
describe "when a non word character is before the cursor", ->
|
||||
it "automatically insert closing quote", ->
|
||||
editSession.buffer.setText("ab@")
|
||||
editSession.setCursorBufferPosition([0, 3])
|
||||
|
||||
@@ -341,7 +341,7 @@ describe "CommandPanel", ->
|
||||
expect(commandPanel.errorMessages).not.toBeVisible()
|
||||
|
||||
|
||||
describe "when the command contains an escaped charachter", ->
|
||||
describe "when the command contains an escaped character", ->
|
||||
it "executes the command with the escaped character (instead of as a backslash followed by the character)", ->
|
||||
rootView.trigger 'command-panel:toggle'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user