From 07308a4e04a69566560fb75f2f2d422b9c59acfa Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 11 Jun 2014 19:02:14 +0200 Subject: [PATCH] :white_check_mark: Add test for outdenting with tabs after normal characters --- spec/editor-spec.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/editor-spec.coffee b/spec/editor-spec.coffee index 485ebe0ef..225709f0e 100644 --- a/spec/editor-spec.coffee +++ b/spec/editor-spec.coffee @@ -2258,6 +2258,15 @@ describe "Editor", -> editor.outdentSelectedRows() expect(buffer.lineForRow(0)).toBe "var quicksort = function () {" + it "outdents only up to the first non-space non-tab character", -> + editor.insertText(' \tfoo\t ') + editor.outdentSelectedRows() + expect(buffer.lineForRow(0)).toBe "\tfoo\t var quicksort = function () {" + editor.outdentSelectedRows() + expect(buffer.lineForRow(0)).toBe "foo\t var quicksort = function () {" + editor.outdentSelectedRows() + expect(buffer.lineForRow(0)).toBe "foo\t var quicksort = function () {" + describe "when one line is selected", -> it "outdents line and retains editor", -> editor.setSelectedBufferRange([[1,4], [1,14]])