From f045ec9983585d44590b48561c0676875232bf2b Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Thu, 22 Mar 2012 11:41:56 -0700 Subject: [PATCH] Add spec for 0 address --- spec/atom/command-interpreter-spec.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/atom/command-interpreter-spec.coffee b/spec/atom/command-interpreter-spec.coffee index e8ba55733..894bcb931 100644 --- a/spec/atom/command-interpreter-spec.coffee +++ b/spec/atom/command-interpreter-spec.coffee @@ -21,6 +21,14 @@ describe "CommandInterpreter", -> interpreter.eval(editor, '4,7') expect(editor.selection.getBufferRange()).toEqual [[3, 0], [7, 0]] + describe "0", -> + it "selects the zero-length string at the start of the file", -> + interpreter.eval(editor, '0') + expect(editor.selection.getBufferRange()).toEqual [[0,0], [0,0]] + + interpreter.eval(editor, '0,1') + expect(editor.selection.getBufferRange()).toEqual [[0,0], [1,0]] + describe "$", -> it "selects EOF", -> interpreter.eval(editor, '$')