diff options
| author | ruki <[email protected]> | 2022-04-07 00:53:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-04-06 23:22:21 +0800 |
| commit | c48a7d959049ad14b6ea09baca682dcbaf88639c (patch) | |
| tree | b023420a92e8c74aeea35b3ce02ba55f98395729 /tests/modules/bytes/test.lua | |
| parent | 79e14625b3977bf7953c2150e584332a0ea8dd16 (diff) | |
improve bytes
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 + |
