summary refs log tree commit diff stats
path: root/tests/misc/t18077.nim
blob: 6cd05d5757f700ac548ffc5bf7a7b77b253a6f5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  cmd: '''nim doc -d:nimTestsT18077b:4 --doccmd:"-d:nimTestsT18077 -d:nimTestsT18077b:3 --hints:off" $file'''
  action: compile
"""

# bug #18077

const nimTestsT18077b {.intdefine.} = 1

static:
  when defined(nimdoc):
    doAssert nimTestsT18077b == 4
    doAssert not defined(nimTestsT18077)
  else:
    doAssert defined(nimTestsT18077)
    doAssert nimTestsT18077b == 3

runnableExamples:
  const nimTestsT18077b {.intdefine.} = 2
  doAssert nimTestsT18077b == 3
  doAssert defined(nimTestsT18077)