summary refs log tree commit diff stats
path: root/tools/heapdumprepl.nim
Commit message (Expand)AuthorAgeFilesLines
* cleaned up heapdumprepl toolAndreas Rumpf2016-06-061-0/+150
='n16' href='#n16'>16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
discard """
  output: '''@["", "", "", "", "", "", "", "meh"]'''
  exitcode: "0"
"""

when true:
  var ab: string
  ab &= "more"

  doAssert ab == "more"

  var x: seq[string]

  setLen(x, 7)

  x.add "meh"

  var s: string
  var z = "abc"
  var zz: string
  s &= "foo" & z & zz

  doAssert s == "fooabc"

  echo x

  # casting an empty string as sequence with shallow() should not segfault
  var s2: string
  shallow(s2)
  s2 &= "foo"
  doAssert s2 == "foo"