summary refs log tree commit diff stats
path: root/tests/casestmt/tcase_arrayconstr.nim
blob: cd7156600a4217d7563777a64ae19c5da6affdff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  output: '''Not found!
Found!'''
"""

const
  md_extension = [".md", ".markdown"]

proc test(ext: string) =
  case ext
  of ".txt", md_extension:
    echo "Found!"
  else:
    echo "Not found!"

test(".something")
# ensure it's not evaluated at compile-time:
var foo = ".markdown"
test(foo)