summary refs log tree commit diff stats
path: root/tests/misc/tspellsuggest2.nim
blob: d20fb00dc57734f6665ed99d554352ed789ef6f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
discard """
  # pending bug #16521 (bug 12) use `matrix`
  cmd: "nim c --spellsuggest:12 --hints:off $file"
  action: "reject"
  nimout: '''
tspellsuggest2.nim(45, 13) Error: undeclared identifier: 'fooBar'
candidates (edit distance, scope distance); see '--spellSuggest':
 (1, 0): 'fooBar8'
 (1, 1): 'fooBar7'
 (1, 3): 'fooBar1'
 (1, 3): 'fooBar2'
 (1, 3): 'fooBar3'
 (1, 3): 'fooBar4'
 (1, 3): 'fooBar5'
 (1, 3): 'fooBar6'
 (1, 5): 'FooBar'
 (1, 5): 'fooBar4'
 (1, 5): 'fooBar9'
 (1, 5): 'fooCar'
'''
"""

# tests `--spellsuggest`






# line 30
import ./mspellsuggest

var fooBar1 = 0
let fooBar2 = 0
const fooBar3 = 0
proc fooBar4() = discard
template fooBar5() = discard
macro fooBar6() = discard

proc main =
  var fooBar7 = 0
  block:
    var fooBar8 = 0
    const fooBarBaz = 0
    let x = fooBar