diff options
Diffstat (limited to 'tests/modules/bytes/test.lua')
| -rw-r--r-- | tests/modules/bytes/test.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/modules/bytes/test.lua b/tests/modules/bytes/test.lua index 4cb272c94..5e1d29a61 100644 --- a/tests/modules/bytes/test.lua +++ b/tests/modules/bytes/test.lua @@ -36,3 +36,12 @@ function test_concat(t) t:are_equal((bytes("123") .. bytes("456")):str(), "123456") t:are_equal(bytes(bytes("123"), bytes("456")):str(), "123456") end + +function test_copy(t) + t:are_equal(bytes(9):copy("123456789"):str(), "123456789") +end + +function test_copy2(t) + t:are_equal(bytes(18):copy("123456789"):copy2(10, "123456789"):str(), "123456789123456789") +end + |
