diff --git a/core/vdbe/mod.rs b/core/vdbe/mod.rs index 75ca713da..23f7d3bd6 100644 --- a/core/vdbe/mod.rs +++ b/core/vdbe/mod.rs @@ -4282,13 +4282,14 @@ mod tests { expected_str ); - // let input_str = OwnedValue::Text(Rc::new(String::from("tes3"))); - // let pattern_str = OwnedValue::Integer(3); - // let replace_str = OwnedValue::Agg(Box::new(AggContext::Sum(OwnedValue::Float(0.1 + 0.2)))); - // let expected_str = OwnedValue::Text(Rc::new(String::from("tes0.3"))); - // assert_eq!( - // exec_replace(&input_str, &pattern_str, &replace_str), - // expected_str - // ); + // todo: change this test to use (0.1 + 0.2) instead of 0.3 when decimals are implemented. + let input_str = OwnedValue::Text(Rc::new(String::from("tes3"))); + let pattern_str = OwnedValue::Integer(3); + let replace_str = OwnedValue::Agg(Box::new(AggContext::Sum(OwnedValue::Float(0.3)))); + let expected_str = OwnedValue::Text(Rc::new(String::from("tes0.3"))); + assert_eq!( + exec_replace(&input_str, &pattern_str, &replace_str), + expected_str + ); } } diff --git a/testing/scalar-functions.test b/testing/scalar-functions.test index 5dcec1e8f..c2be07fb9 100755 --- a/testing/scalar-functions.test +++ b/testing/scalar-functions.test @@ -164,7 +164,7 @@ do_execsql_test replace { } {example} do_execsql_test replace-number { - select replace('tes3', 3, 0.1 + 0.2) + select replace('tes3', 3, 0.3) } {tes0.3} do_execsql_test replace-null {