tests: add tests of function string_replace_with_callback