Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples of deserialization issues #681

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading