-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathindent-parenexpr.swift
67 lines (47 loc) · 1.91 KB
/
indent-parenexpr.swift
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
func foo() {
bar(
)
bar({
})
bar(abc, {
})
bar((
))
bar(
(
)
)
}
// RUN: %sourcekitd-test -req=format -line=2 -length=1 %s >%t.response
// RUN: %sourcekitd-test -req=format -line=3 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=4 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=6 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=7 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=8 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=10 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=11 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=12 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=14 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=15 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=16 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=18 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=19 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=20 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=21 -length=1 %s >>%t.response
// RUN: %FileCheck --strict-whitespace %s <%t.response
// CHECK: key.sourcetext: " bar("
// CHECK: key.sourcetext: " "
// CHECK: key.sourcetext: " )"
// CHECK: key.sourcetext: " bar({"
// CHECK: key.sourcetext: " "
// CHECK: key.sourcetext: " })"
// CHECK: key.sourcetext: " bar(abc, {"
// CHECK: key.sourcetext: " "
// CHECK: key.sourcetext: " })"
// CHECK: key.sourcetext: " bar(("
// CHECK: key.sourcetext: " "
// CHECK: key.sourcetext: " ))"
// CHECK: key.sourcetext: " bar("
// CHECK: key.sourcetext: " ("
// CHECK: key.sourcetext: " )"
// CHECK: key.sourcetext: " )"