Download:
child 33:40f83ed9b472
parent 31:aef6b4e933b0
32:b958f661c857
Anton Shestakov <av6@dwimlabs.net>, Fri, 16 Sep 2016 15:50:07 +0800
spec: assert(io.open()) to fail early

1 файлов изменено, 1 вставок(+), 1 удалений(-) [+]
spec/hglib_spec.lua file | annotate | diff | comparison | revisions
--- a/spec/hglib_spec.lua Fri Sep 16 10:40:32 2016 +0800
+++ b/spec/hglib_spec.lua Fri Sep 16 15:50:07 2016 +0800
@@ -19,7 +19,7 @@
describe('hglib client', function()
it('can connect using just file handles', function()
- local rh = io.open('spec/data/hello', 'rb')
+ local rh = assert(io.open('spec/data/hello', 'rb'))
local client = hglib.Client.connect(rh, nil)
client:close()
assert.are_equal('closed file', io.type(rh))