diff options
Diffstat (limited to 'tests/conformance/1-source/lit_str_zero_terminated.zc')
| -rw-r--r-- | tests/conformance/1-source/lit_str_zero_terminated.zc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/conformance/1-source/lit_str_zero_terminated.zc b/tests/conformance/1-source/lit_str_zero_terminated.zc new file mode 100644 index 0000000..846294a --- /dev/null +++ b/tests/conformance/1-source/lit_str_zero_terminated.zc @@ -0,0 +1,5 @@ +// expect: 3/0/ +// spec 1.4.4: stored one per word, followed by a 0 word +include rt; +void pn(int x) { rt.put_n(x); rt.put_c(10); } +fn main() { char* s = "abc"; pn(rt.len_w(s)); pn(s[3]); return 0; } |
