Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-tablex3.lua « tests - github.com/stevedonovan/Penlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6f4ea18a6bc3e16e5600870bcee4a39b2ff79a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- tablex.move when the tables are the same
-- and there are overlapping ranges
T = require 'pl.tablex'
asserteq = require 'pl.test'.asserteq

t1 = {1,2,3,4,5,6,7,8,9,10}
t2 = T.copy(t1)
t3 = T.copy(t1)

T.move(t1,t2,4,1,4)
T.move(t3,t3,4,1,4)
asserteq(t1,t3)