From c48a7d959049ad14b6ea09baca682dcbaf88639c Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 7 Apr 2022 00:53:39 +0800 Subject: improve bytes --- tests/modules/bytes/test.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/modules/bytes/test.lua') 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 + -- cgit v1.3.1