diff options
| author | ruki <[email protected]> | 2022-04-07 21:01:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-04-07 21:01:13 +0800 |
| commit | cb099dedd27ecfb5d52d5991b44de22eb86ff336 (patch) | |
| tree | 56afb156611694ee9fae6b78235c0ae3ee93680a /tests/modules/bytes/test.lua | |
| parent | c48a7d959049ad14b6ea09baca682dcbaf88639c (diff) | |
add move to bytes
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 |
