diff options
| author | xackus <14938807+xackus@users.noreply.github.com> | 2020-06-20 18:35:01 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-06-21 14:57:12 -0400 |
| commit | d907f574e02aadf8196e616bcc2fb2813cf2c82c (patch) | |
| tree | afd234afad685c9498582e90329cda004fb6e6a8 /test | |
| parent | 8696e52a3d617ce30ec6202adc89cb10c67bcc43 (diff) | |
| download | zig-d907f574e02aadf8196e616bcc2fb2813cf2c82c.tar.gz zig-d907f574e02aadf8196e616bcc2fb2813cf2c82c.zip | |
stage1: fix concat of sliced str literals
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage1/behavior/slice.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/stage1/behavior/slice.zig b/test/stage1/behavior/slice.zig index 1faefe6800..8aa3bdb7c1 100644 --- a/test/stage1/behavior/slice.zig +++ b/test/stage1/behavior/slice.zig @@ -280,6 +280,11 @@ test "slice syntax resulting in pointer-to-array" { expect(slice[0] == 5); comptime expect(@TypeOf(src_slice[0..2]) == *align(4) [2]u8); } + + fn testConcatStrLiterals() void { + expectEqualSlices("a"[0..] ++ "b"[0..], "ab"); + expectEqualSlices("a"[0..:0] ++ "b"[0..:0], "ab"); + } }; S.doTheTest(); |
