Skip to content

Commit 6ca2c4d

Browse files
committed
Remove test and fix line length
1 parent 79ff206 commit 6ca2c4d

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

extensions/src/test/java/dev/cel/extensions/CelStringExtensionsTest.java

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,9 +1515,9 @@ public void quote_success(String string, String expectedResult) throws Exception
15151515

15161516
@Test
15171517
public void quote_singleWithDoubleQuotes() throws Exception {
1518-
CelAbstractSyntaxTree ast = COMPILER.compile(
1519-
"strings.quote('single-quote with \"double quote\"') == \"\\\"single-quote with \\\\\\\"double quote\\\\\\\"\\\"\""
1520-
).getAst();
1518+
String expr = "strings.quote('single-quote with \"double quote\"')";
1519+
String expected = "\"\\\"single-quote with \\\\\\\"double quote\\\\\\\"\\\"\"";
1520+
CelAbstractSyntaxTree ast = COMPILER.compile(expr + " == " + expected).getAst();
15211521
CelRuntime.Program program = RUNTIME.createProgram(ast);
15221522

15231523
Object evaluatedResult = program.eval();
@@ -1539,17 +1539,6 @@ public void quote_escapesSpecialCharacters() throws Exception {
15391539
.isEqualTo("\"\\abell\\vvtab\\bback\\ffeed\\rret\\nline\\ttab\\\\slash 가 😁\"");
15401540
}
15411541

1542-
@Test
1543-
@TestParameters({"{rawString: !!binary 'ZmlsbGVyIJ8=', expectedResult: '\"filler \uFFFD\"'}"}) // "filler \x9f"
1544-
public void quote_escapesMalformed(byte[] rawString, String expectedResult) throws Exception {
1545-
CelAbstractSyntaxTree ast = COMPILER.compile("strings.quote(s)").getAst();
1546-
CelRuntime.Program program = RUNTIME.createProgram(ast);
1547-
1548-
Object evaluatedResult = program.eval(ImmutableMap.of("s", new String(rawString, StandardCharsets.UTF_8)));
1549-
1550-
assertThat(evaluatedResult).isEqualTo(expectedResult);
1551-
}
1552-
15531542
@Test
15541543
public void quote_escapesMalformed_endWithHighSurrogate() throws Exception {
15551544
CelRuntime.Program program = RUNTIME.createProgram(COMPILER.compile("strings.quote(s)").getAst());

0 commit comments

Comments
 (0)