update test for slice
This commit is contained in:
parent
341e611ac4
commit
95a6b6b1c0
6
test.lua
6
test.lua
@ -304,6 +304,12 @@ local function test_slice()
|
|||||||
for i=1, #g do
|
for i=1, #g do
|
||||||
assert( g[i] == buf[i] )
|
assert( g[i] == buf[i] )
|
||||||
end
|
end
|
||||||
|
local h = buf:slice( 1000, 2000 )
|
||||||
|
assert( #h == 0 )
|
||||||
|
local i = buf:slice( 6, 3 )
|
||||||
|
assert( #h == 0 )
|
||||||
|
local j = buf:slice( -1000, -900 )
|
||||||
|
assert( #h == 0 )
|
||||||
end
|
end
|
||||||
|
|
||||||
test_readonly()
|
test_readonly()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user