Skip to content

Commit ce0c847

Browse files
committed
Update test cases of string replace.
1 parent 278ed9e commit ce0c847

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test-syntax.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,12 @@ TEST(SyntaxTest, SimpleCases) {
8484
EXPECT_EQ(
8585
"Ok",
8686
render("{{ 'ok'.capitalize() }}", {}, {}));
87-
EXPECT_EQ("obcXYZobcXYZobc",
88-
render("{{ 'abcXYZabcXYZabc'.replace('a', 'o') }}", {}, {}));
89-
EXPECT_EQ("okcXYZokcXYZabc",
90-
render("{{ 'abcXYZabcXYZabc'.replace('ab', 'ok', 2) }}", {}, {}));
87+
EXPECT_EQ("aouiXYZaouiXYZaoui",
88+
render("{{ 'abcXYZabcXYZabc'.replace('bc', 'oui') }}", {}, {}));
89+
EXPECT_EQ("okXYZokXYZabc",
90+
render("{{ 'abcXYZabcXYZabc'.replace('abc', 'ok', 2) }}", {}, {}));
91+
EXPECT_EQ("abcXYZabcXYZabc",
92+
render("{{ 'abcXYZabcXYZabc'.replace('def', 'ok') }}", {}, {}));
9193

9294
EXPECT_EQ(
9395
"ok",

0 commit comments

Comments
 (0)