aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-04-08 22:51:13 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-04-08 22:51:13 +0200
commitc7254b29876ac9e131ad64d07426a6dcb493a25a (patch)
tree7b609e3e030f00f5a9e55ef540d002c2a8e6347f
parent998f69565e765fd15cf08604345a08505fa9c547 (diff)
downloadvis-c7254b29876ac9e131ad64d07426a6dcb493a25a.tar.gz
vis-c7254b29876ac9e131ad64d07426a6dcb493a25a.tar.xz
test: update tests to for new line ending handling
-rw-r--r--lua/file-empty.lua4
-rw-r--r--lua/lines.lua2
-rw-r--r--vis/motions/line-end.ref2
3 files changed, 2 insertions, 6 deletions
diff --git a/lua/file-empty.lua b/lua/file-empty.lua
index 170abc7..69ec17d 100644
--- 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
index ae2d2f8..745e8b0 100644
--- 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
index 112fbcc..b2dd26b 100644
--- 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