summary refs log tree commit diff stats
path: root/tests/stdlib/tsplit2.nim
blob: 7fd9dda7474ed0a78c45e2388c02f293f6a8cf81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  file: "tsplit2.nim"
  output: "true"
"""
import strutils

var s = ""
for w in split("|abc|xy|z", {'|'}):
  s.add("#")
  s.add(w)

try:
  discard "hello".split("")
  echo "false"
except AssertionError:
  echo "true"

#OUT true