diff --git a/vlib/v/tests/valgrind/1.vv b/vlib/v/tests/valgrind/1.vv index 161c5b1c10..92dace75b7 100644 --- a/vlib/v/tests/valgrind/1.vv +++ b/vlib/v/tests/valgrind/1.vv @@ -16,12 +16,24 @@ fn foo() { //str_inter := 'hello, $name' // concatenated strings must be freed + + //nums.free() // this should result in a double free and a CI error } +fn str_replace() { + s := 'hello world' + r := s.replace('hello', 'hi') + cloned := s.replace('hello', 'hi').clone() + cloned2 := r.clone() + println(s) + println(r) +} + fn main() { println('start') foo() + str_replace() println('end') }