Skip to content

Commit

Permalink
Merge pull request #681 from JackTreble/master
Browse files Browse the repository at this point in the history
Add examples of deserialization issues
  • Loading branch information
tminglei authored Dec 16, 2023
2 parents 73f997f + b6827f7 commit 31b16e0
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,17 @@ class PgCompositeSupportSuite extends AnyFunSuite with PostgresContainer {
val rec31 = TestBean3(1, None)
val rec32 = TestBean3(2, Some(Composite4(1, "x1", Nil, Some(List.empty), "get(\"x1\").ok", "(4).ok")))
val rec32_al = TestBean3(2, Some(Composite4(1, "x1", Nil, None, "get(\"x1\").ok", "(4).ok")))
val rec33 = TestBean3(3, Some(Composite4(2, "x2", List("xxx(yyy)zz,z", "u(vv)(w)x(y)", "x=1&y=2&[INSERT_DEVICE_ID_HERE]&z=3"), Some(List("\"t")), "(get(\"A\") + get(\"A\")).ok", "call(A, B).ok")))
val rec33 = TestBean3(3, Some(Composite4(2, "x2", List("xxx(yyy)zz,z", "u(vv)(w)x(y)", "x=1&y=2&[INSERT_DEVICE_ID_HERE]&z=3",
")read_world_example", // parses a null element into list `" null, ")read_world_example"`
"(", ")", // parsed as one element `"(,)"`
"{\"", "}", // parsed as one element `""{",}"`
"\\", "\"", // both are parsed as `\"`

// "();", // the following completely break parsing
// "(real_world_example",
// ")", "(",
// "{\""
), Some(List("\"t")), "(get(\"A\") + get(\"A\")).ok", "call(A, B).ok")))

test("Composite type Lifted support") {
Await.result(db.run(
Expand Down

0 comments on commit 31b16e0

Please sign in to comment.