From 5c35e9b90275e96b88114bd003765ee5e770d24e Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 19 Aug 2023 11:26:47 +0300 Subject: [PATCH] tests: fix compiler notices for the REPL test runner, use `encoding.hex` instead of the `compress` module in import_alias.repl --- vlib/v/slow_tests/repl/import_alias.repl | 6 +++--- vlib/v/slow_tests/repl/runner/runner.v | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vlib/v/slow_tests/repl/import_alias.repl b/vlib/v/slow_tests/repl/import_alias.repl index 21636400a9..85d68fe514 100644 --- a/vlib/v/slow_tests/repl/import_alias.repl +++ b/vlib/v/slow_tests/repl/import_alias.repl @@ -1,4 +1,4 @@ -import compress.zlib as z -z.compress('hello world'.bytes())! +import encoding.hex as z +z.decode('AB09CD')!.hex() ===output=== -[120, 1, 1, 11, 0, 244, 255, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 26, 11, 4, 93] +ab09cd diff --git a/vlib/v/slow_tests/repl/runner/runner.v b/vlib/v/slow_tests/repl/runner/runner.v index c7142f4108..6936409fd4 100644 --- a/vlib/v/slow_tests/repl/runner/runner.v +++ b/vlib/v/slow_tests/repl/runner/runner.v @@ -122,7 +122,7 @@ pub fn new_options() RunnerOptions { mut wd := os.getwd() mut files := []string{} if os.args.len > 1 { - files = os.args[1..] + files = os.args[1..].clone() } else { os.chdir(os.dir(vexec)) or {} wd = os.getwd() @@ -140,7 +140,7 @@ pub fn new_prod_options() RunnerOptions { vexec := full_path_to_v(4) mut files := []string{} if os.args.len > 1 { - files = os.args[1..] + files = os.args[1..].clone() } else { files = os.walk_ext(wd, '.prod.v') }