vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit fdaaaf0602bce645a6003233b71f0ae6fe48f574 parent a85616faf742ba0461ed1ef355c5900c812b837e Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 8 Apr 2017 22:51:13 +0200 test: update tests to for new line ending handling Diffstat:
| M | lua/file-empty.lua | | | 4 | ---- |
| M | lua/lines.lua | | | 2 | +- |
| M | vis/motions/line-end.ref | | | 2 | +- |
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lua/file-empty.lua b/lua/file-empty.lua @@ -8,10 +8,6 @@ describe("empty file", function() assert.are.equal(0, file.size) end) - it("has \\n line endings", function() - assert.are.equal("lf", file.newlines) - end) - it("has zero lines", function() assert.are.equal(0, #file.lines) end) diff --git a/lua/lines.lua b/lua/lines.lua @@ -39,7 +39,7 @@ describe("get file.lines[]", function() end) it("get empty \r\n line", function() - assert.are.equals("", file.lines[4]) + assert.are.equals("\r", file.lines[4]) end) it("get lines[#lines]", function() diff --git a/vis/motions/line-end.ref b/vis/motions/line-end.ref @@ -3,7 +3,7 @@ $ To the end of the line. 2 From 3 From end to end 4 empty line \n 5 empty line \r\n - + 7 Tabs 8 Backspace