buffer.c: change return type to bool

Co-authored-by: Wayne Rowcliffe (@war1025)
This commit is contained in:
Charles Joachim
2016-02-15 23:34:51 -05:00
parent c8d830e896
commit 55844eee10
2 changed files with 135 additions and 106 deletions

View File

@@ -41,13 +41,13 @@ describe('buffer functions', function()
describe('buf_valid', function()
it('should view NULL as an invalid buffer', function()
eq(0, buffer.buf_valid(NULL))
eq(false, buffer.buf_valid(NULL))
end)
it('should view an open buffer as valid', function()
local buf = buflist_new(path1, buffer.BLN_LISTED)
eq(1, buffer.buf_valid(buf))
eq(true, buffer.buf_valid(buf))
end)
it('should view a closed and hidden buffer as valid', function()
@@ -55,7 +55,7 @@ describe('buffer functions', function()
close_buffer(NULL, buf, 0, 0)
eq(1, buffer.buf_valid(buf))
eq(true, buffer.buf_valid(buf))
end)
it('should view a closed and unloaded buffer as valid', function()
@@ -63,7 +63,7 @@ describe('buffer functions', function()
close_buffer(NULL, buf, buffer.DOBUF_UNLOAD, 0)
eq(1, buffer.buf_valid(buf))
eq(true, buffer.buf_valid(buf))
end)
it('should view a closed and wiped buffer as invalid', function()
@@ -71,7 +71,7 @@ describe('buffer functions', function()
close_buffer(NULL, buf, buffer.DOBUF_WIPE, 0)
eq(0, buffer.buf_valid(buf))
eq(false, buffer.buf_valid(buf))
end)
end)