From b97c6d29b6a1c66c2596033cd255d6803939aba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 4 Mar 2017 18:26:54 +0100 Subject: test/lua: convert tests to busted infrastructure --- lua/file-empty.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua/file-empty.lua (limited to 'lua/file-empty.lua') diff --git a/lua/file-empty.lua b/lua/file-empty.lua new file mode 100644 index 0000000..95b34b0 --- /dev/null +++ b/lua/file-empty.lua @@ -0,0 +1,25 @@ +local busted = require 'busted.runner'() + +local file = vis.win.file + +describe("empty file", function() + + it("has size zero", 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) + + it("has lines[1] == ''", function() + -- is that what we want? + assert.are.equal("", file.lines[1]) + end) + +end) + -- cgit v1.2.3