Here are further tests.
The string.mbt is the file in the latest branch, and the string_old.mbt is the file before merge #232.
139,184c139,184
< 000008a0: 7d0a 0a20 2040 6173 7365 7274 696f 6e2e }.. @assertion.
< 000008b0: 6173 7365 7274 5f65 7128 7265 7072 2822 assert_eq(repr("
< 000008c0: 6122 292c 2022 5c22 615c 2222 293f 0a20 a"), "\"a\"")?.
< 000008d0: 2040 6173 7365 7274 696f 6e2e 6173 7365 @assertion.asse
< 000008e0: 7274 5f65 7128 7265 7072 2822 2722 292c rt_eq(repr("'"),
< 000008f0: 2022 5c22 275c 2222 293f 0a20 2040 6173 "\"'\"")?. @as
< 00000900: 7365 7274 696f 6e2e 6173 7365 7274 5f65 sertion.assert_e
< 00000910: 7128 7265 7072 2822 5c22 2229 2c20 225c q(repr("\""), "\
< 00000920: 225c 5c5c 225c 2222 293f 0a20 2040 6173 "\\\"\"")?. @as
< 00000930: 7365 7274 696f 6e2e 6173 7365 7274 5f65 sertion.assert_e
< 00000940: 7128 7265 7072 2822 5c5c 2229 2c20 225c q(repr("\\"), "\
< 00000950: 225c 5c5c 5c5c 2222 293f 0a20 2040 6173 "\\\\\"")?. @as
< 00000960: 7365 7274 696f 6e2e 6173 7365 7274 5f65 sertion.assert_e
< 00000970: 7128 7265 7072 2822 5c6e 2229 2c20 225c q(repr("\n"), "\
< 00000980: 225c 5c6e 5c22 2229 3f0a 2020 4061 7373 "\\n\"")?. @ass
< 00000990: 6572 7469 6f6e 2e61 7373 6572 745f 6571 ertion.assert_eq
< 000009a0: 2872 6570 7228 225c 7222 292c 2022 5c22 (repr("\r"), "\"
< 000009b0: 5c5c 725c 2222 293f 0a20 2040 6173 7365 \\r\"")?. @asse
< 000009c0: 7274 696f 6e2e 6173 7365 7274 5f65 7128 rtion.assert_eq(
< 000009d0: 7265 7072 2822 5c62 2229 2c20 225c 225c repr("\b"), "\"\
< 000009e0: 5c62 5c22 2229 3f0a 2020 4061 7373 6572 \b\"")?. @asser
< 000009f0: 7469 6f6e 2e61 7373 6572 745f 6571 2872 tion.assert_eq(r
< 00000a00: 6570 7228 225c 7422 292c 2022 5c22 5c5c epr("\t"), "\"\\
< 00000a10: 745c 2222 293f 0a20 2040 6173 7365 7274 t\"")?. @assert
< 00000a20: 696f 6e2e 6173 7365 7274 5f65 7128 7265 ion.assert_eq(re
< 00000a30: 7072 2822 0022 292c 2022 5c22 5c5c 7830 pr("."), "\"\\x0
< 00000a40: 305c 2222 293f 0a20 2040 6173 7365 7274 0\"")?. @assert
< 00000a50: 696f 6e2e 6173 7365 7274 5f65 7128 7265 ion.assert_eq(re
< 00000a60: 7072 2822 6162 6327 5c22 6465 665c 5c22 pr("abc'\"def\\"
< 00000a70: 292c 2022 5c22 6162 6327 5c5c 5c22 6465 ), "\"abc'\\\"de
< 00000a80: 665c 5c5c 5c5c 2222 293f 0a7d 0a0a 2f2f f\\\\\"")?.}..//
< 00000a90: 2074 6573 7420 6865 7265 2074 6f20 6176 test here to av
< 00000aa0: 6c69 6420 6379 636c 6963 2064 6570 656e lid cyclic depen
< 00000ab0: 6465 6e63 7920 6265 7477 6565 6e20 6173 dency between as
< 00000ac0: 7365 7274 696f 6e20 616e 6420 6275 696c sertion and buil
< 00000ad0: 7469 6e0a 7465 7374 2022 4275 6666 6572 tin.test "Buffer
< 00000ae0: 3a3a 746f 5f62 7974 6573 2220 7b0a 2020 ::to_bytes" {.
< 00000af0: 6c65 7420 6275 6666 6572 203d 2042 7566 let buffer = Buf
< 00000b00: 6665 723a 3a6d 616b 6528 3136 290a 2020 fer::make(16).
< 00000b10: 6275 6666 6572 2e77 7269 7465 5f73 7472 buffer.write_str
< 00000b20: 696e 6728 22e4 b8ad e696 8722 290a 2020 ing("......").
< 00000b30: 4061 7373 6572 7469 6f6e 2e61 7373 6572 @assertion.asser
< 00000b40: 745f 6571 2862 7566 6665 722e 746f 5f62 t_eq(buffer.to_b
< 00000b50: 7974 6573 2829 2e74 6f5f 7374 7269 6e67 ytes().to_string
< 00000b60: 2829 2c20 22e4 b8ad e696 8722 293f 0a7d (), "......")?.}
< 00000b70: 0a .
---
> 000008a0: 7d0a 2020 4061 7373 6572 7469 6f6e 2e61 }. @assertion.a
> 000008b0: 7373 6572 745f 6571 2872 6570 7228 2261 ssert_eq(repr("a
> 000008c0: 2229 2c20 225c 2261 5c22 2229 3f0a 2020 "), "\"a\"")?.
> 000008d0: 4061 7373 6572 7469 6f6e 2e61 7373 6572 @assertion.asser
> 000008e0: 745f 6571 2872 6570 7228 2227 2229 2c20 t_eq(repr("'"),
> 000008f0: 225c 2227 5c22 2229 3f0a 2020 4061 7373 "\"'\"")?. @ass
> 00000900: 6572 7469 6f6e 2e61 7373 6572 745f 6571 ertion.assert_eq
> 00000910: 2872 6570 7228 225c 2222 292c 2022 5c22 (repr("\""), "\"
> 00000920: 5c5c 5c22 5c22 2229 3f0a 2020 4061 7373 \\\"\"")?. @ass
> 00000930: 6572 7469 6f6e 2e61 7373 6572 745f 6571 ertion.assert_eq
> 00000940: 2872 6570 7228 225c 5c22 292c 2022 5c22 (repr("\\"), "\"
> 00000950: 5c5c 5c5c 5c22 2229 3f0a 2020 4061 7373 \\\\\"")?. @ass
> 00000960: 6572 7469 6f6e 2e61 7373 6572 745f 6571 ertion.assert_eq
> 00000970: 2872 6570 7228 225c 6e22 292c 2022 5c22 (repr("\n"), "\"
> 00000980: 5c5c 6e5c 2222 293f 0a20 2040 6173 7365 \\n\"")?. @asse
> 00000990: 7274 696f 6e2e 6173 7365 7274 5f65 7128 rtion.assert_eq(
> 000009a0: 7265 7072 2822 5c72 2229 2c20 225c 225c repr("\r"), "\"\
> 000009b0: 5c72 5c22 2229 3f0a 2020 4061 7373 6572 \r\"")?. @asser
> 000009c0: 7469 6f6e 2e61 7373 6572 745f 6571 2872 tion.assert_eq(r
> 000009d0: 6570 7228 225c 6222 292c 2022 5c22 5c5c epr("\b"), "\"\\
> 000009e0: 625c 2222 293f 0a20 2040 6173 7365 7274 b\"")?. @assert
> 000009f0: 696f 6e2e 6173 7365 7274 5f65 7128 7265 ion.assert_eq(re
> 00000a00: 7072 2822 5c74 2229 2c20 225c 225c 5c74 pr("\t"), "\"\\t
> 00000a10: 5c22 2229 3f0a 2020 4061 7373 6572 7469 \"")?. @asserti
> 00000a20: 6f6e 2e61 7373 6572 745f 6571 2872 6570 on.assert_eq(rep
> 00000a30: 7228 225c 7830 3022 292c 2022 5c22 5c5c r("\x00"), "\"\\
> 00000a40: 7830 305c 2222 293f 0a20 2040 6173 7365 x00\"")?. @asse
> 00000a50: 7274 696f 6e2e 6173 7365 7274 5f65 7128 rtion.assert_eq(
> 00000a60: 7265 7072 2822 6162 6327 5c22 6465 665c repr("abc'\"def\
> 00000a70: 5c22 292c 2022 5c22 6162 6327 5c5c 5c22 \"), "\"abc'\\\"
> 00000a80: 6465 665c 5c5c 5c5c 2222 293f 0a7d 0a0a def\\\\\"")?.}..
> 00000a90: 2f2f 2074 6573 7420 6865 7265 2074 6f20 // test here to
> 00000aa0: 6176 6c69 6420 6379 636c 6963 2064 6570 avlid cyclic dep
> 00000ab0: 656e 6465 6e63 7920 6265 7477 6565 6e20 endency between
> 00000ac0: 6173 7365 7274 696f 6e20 616e 6420 6275 assertion and bu
> 00000ad0: 696c 7469 6e0a 7465 7374 2022 4275 6666 iltin.test "Buff
> 00000ae0: 6572 3a3a 746f 5f62 7974 6573 2220 7b0a er::to_bytes" {.
> 00000af0: 2020 6c65 7420 6275 6666 6572 203d 2042 let buffer = B
> 00000b00: 7566 6665 723a 3a6d 616b 6528 3136 290a uffer::make(16).
> 00000b10: 2020 6275 6666 6572 2e77 7269 7465 5f73 buffer.write_s
> 00000b20: 7472 696e 6728 22e4 b8ad e696 8722 290a tring("......").
> 00000b30: 2020 4061 7373 6572 7469 6f6e 2e61 7373 @assertion.ass
> 00000b40: 6572 745f 6571 2862 7566 6665 722e 746f ert_eq(buffer.to
> 00000b50: 5f62 7974 6573 2829 2e74 6f5f 7374 7269 _bytes().to_stri
> 00000b60: 6e67 2829 2c20 22e4 b8ad e696 8722 293f ng(), "......")?
> 00000b70: 0a7d