diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-08-21 15:32:56 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-08-21 15:33:03 +0200 |
| commit | d52493938e9b070ca593246427c384c500c5c13e (patch) | |
| tree | 1ba4af6dd640240b9ce141b48152a697ce42d96e /tests | |
| parent | 99ddbafc095695d278fba81d835e88ac23e9b990 (diff) | |
Make bytes joinable
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compiler/bytes.typ | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/typ/compiler/bytes.typ b/tests/typ/compiler/bytes.typ index 32d0d573..fa724858 100644 --- a/tests/typ/compiler/bytes.typ +++ b/tests/typ/compiler/bytes.typ @@ -13,6 +13,17 @@ #test(array(bytes("Hello")), (0x48, 0x65, 0x6C, 0x6C, 0x6F)) --- +// Test addition and joining. +#test(bytes((1, 2)) + bytes(()), bytes((1, 2))) +#test(bytes((1, 2)) + bytes((3, 4)), bytes((1, 2, 3, 4))) +#test(bytes(()) + bytes((3, 4)), bytes((3, 4))) +#test(str({ + bytes("Hello") + bytes((0x20,)) + bytes("World") +}), "Hello World") + +--- // Error: 8-14 expected string, array, or bytes, found dictionary #bytes((a: 1)) |
