diff options
author | chai <chaifix@163.com> | 2021-10-30 11:32:16 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-30 11:32:16 +0800 |
commit | 42ec7286b2d36a9ba22925f816a17cb1cc2aa5ce (patch) | |
tree | 24bc7009457a8d7500f264e89946dc20d069294f /Data/Libraries/Penlight/tests/test-tablex3.lua | |
parent | 164885fd98d48703bd771f802d79557b7db97431 (diff) |
+ Penlight
Diffstat (limited to 'Data/Libraries/Penlight/tests/test-tablex3.lua')
-rw-r--r-- | Data/Libraries/Penlight/tests/test-tablex3.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Data/Libraries/Penlight/tests/test-tablex3.lua b/Data/Libraries/Penlight/tests/test-tablex3.lua new file mode 100644 index 0000000..6f4ea18 --- /dev/null +++ b/Data/Libraries/Penlight/tests/test-tablex3.lua @@ -0,0 +1,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) |