Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
// vtest build: started_mysqld?
module mysql
import json
struct MysqlErrorPayload {
data string
}
fn test_clone_mysql_cstring_keeps_json_encodable_error_text() {
mut backing :=
"Incorrect string value: 'undefined' for function uuid_to_bin; code: 1411".bytes()
backing << u8(0)
msg := clone_mysql_cstring(backing.data)
backing[0] = 0xff
assert msg == "Incorrect string value: 'undefined' for function uuid_to_bin; code: 1411"
assert json.encode(MysqlErrorPayload{
data: msg
}) == '{"data":"Incorrect string value: \'undefined\' for function uuid_to_bin; code: 1411"}'
}