Download:
child 24:9048a48a9926
parent 22:4120e00edf14
23:c66dba9e0892
Anton Shestakov <av6@dwimlabs.net>, Sat, 10 Sep 2016 18:57:47 +0800
spec: client should also close file handles on :close()

1 файлов изменено, 2 вставок(+), 1 удалений(-) [+]
spec/hglib_spec.lua file | annotate | diff | comparison | revisions
--- a/spec/hglib_spec.lua Sat Sep 10 15:14:24 2016 +0800
+++ b/spec/hglib_spec.lua Sat Sep 10 18:57:47 2016 +0800
@@ -21,7 +21,8 @@
it('can connect using just file handles', function()
local rh = io.open('spec/data/hello', 'rb')
local client = hglib.Client.connect(rh, nil)
- rh:close()
+ client:close()
+ assert.are_equal('closed file', io.type(rh))
assert.is_true(client.capabilities.getencoding)
assert.is_true(client.capabilities.runcommand)
assert.are_equal('UTF-8', client.encoding)