* fix #17159 items(cstring) works in VM * improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs * document items(cstring) * address comments
This commit is contained in:
parent
3021252ad4
commit
11a7fa68f6
4 changed files with 155 additions and 43 deletions
|
|
@ -1,16 +0,0 @@
|
|||
discard """
|
||||
cmd: "nim c --gc:arc -r $file"
|
||||
nimout: '''hello
|
||||
h
|
||||
o
|
||||
'''
|
||||
"""
|
||||
|
||||
# Issue #13321: [codegen] --gc:arc does not properly emit cstring, results in SIGSEGV
|
||||
|
||||
let a = "hello".cstring
|
||||
echo a
|
||||
echo a[0]
|
||||
echo a[4]
|
||||
doAssert a[a.len] == '\0'
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue