diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-04 18:26:54 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-04 18:26:54 +0100 |
| commit | b97c6d29b6a1c66c2596033cd255d6803939aba0 (patch) | |
| tree | 4d0f68ad1f76e7e94214a18281d3419d5ffff591 /lua/file-empty.lua | |
| parent | 54dd1d2bf9a6cbfbd754e1e53fdda55f3acbbc15 (diff) | |
| download | vis-b97c6d29b6a1c66c2596033cd255d6803939aba0.tar.gz vis-b97c6d29b6a1c66c2596033cd255d6803939aba0.tar.xz | |
test/lua: convert tests to busted infrastructure
Diffstat (limited to 'lua/file-empty.lua')
| -rw-r--r-- | lua/file-empty.lua | 25 |
1 files changed, 25 insertions, 0 deletions
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) + |
