diff options
Diffstat (limited to 'tests/modules/bytes/test.lua')
| -rw-r--r-- | tests/modules/bytes/test.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/modules/bytes/test.lua b/tests/modules/bytes/test.lua index 5e1d29a61..ef450ebce 100644 --- a/tests/modules/bytes/test.lua +++ b/tests/modules/bytes/test.lua @@ -39,9 +39,16 @@ end function test_copy(t) t:are_equal(bytes(9):copy("123456789"):str(), "123456789") + t:are_equal(bytes(5):copy("123456789", 5, 9):str(), "56789") end function test_copy2(t) t:are_equal(bytes(18):copy("123456789"):copy2(10, "123456789"):str(), "123456789123456789") + t:are_equal(bytes(14):copy("123456789"):copy2(10, "123456789", 5, 9):str(), "12345678956789") +end + +function test_move(t) + t:are_equal(bytes(9):copy("123456789"):move(5, 9):str(), "567896789") + t:are_equal(bytes(9):copy("123456789"):move2(2, 5, 9):str(), "156789789") end |
