Skip to content

Commit 292c540

Browse files
authored
Merge pull request swiftlang#29189 from compnerd/20200108-sourcekit-test
tests: adjust the SourceKit tests for line endings (NFCI)
2 parents 4e7141b + 2265d6e commit 292c540

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+139
-139
lines changed

test/SourceKit/CodeComplete/complete_constructor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ class Foo {
77
Foo(
88

99
// RUN: %sourcekitd-test -req=complete -pos=7:5 %s -- %s > %t.response
10-
// RUN: diff -u %s.response %t.response
10+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

test/SourceKit/CodeComplete/complete_member.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func testOverrideUSR() {
4040
}
4141

4242
// RUN: %sourcekitd-test -req=complete -pos=15:5 %s -- %s > %t.response
43-
// RUN: diff -u %s.response %t.response
43+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
4444
//
4545
// RUN: %sourcekitd-test -req=complete -pos=19:5 %s -- %s | %FileCheck %s -check-prefix=CHECK-OPTIONAL
4646
// RUN: %sourcekitd-test -req=complete.open -pos=19:5 %s -- %s | %FileCheck %s -check-prefix=CHECK-OPTIONAL-OPEN

test/SourceKit/CodeComplete/complete_override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ class Derived : Base {
66
}
77

88
// RUN: %sourcekitd-test -req=complete -pos=5:1 %s -- %s > %t.response
9-
// RUN: diff -u %s.response %t.response
9+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
1010

test/SourceKit/CodeComplete/complete_unresolvedmember.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ func test() -> Foo {
1212
}
1313

1414
// RUN: %sourcekitd-test -req=complete -pos=11:11 %s -- %s > %t.response
15-
// RUN: diff -u %s.response %t.response
15+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
1616

test/SourceKit/ConformingMethods/basic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ func testing(obj: C) {
2727
}
2828

2929
// RUN: %sourcekitd-test -req=conformingmethods -pos=26:14 %s -req-opts=expectedtypes='$s8MyModule7Target2PD;$s8MyModule7Target1PD' -- -module-name MyModule %s > %t.response
30-
// RUN: diff -u %s.response %t.response
30+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

test/SourceKit/ConformingMethods/generics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ func test<X>(value: S<X>) {
1818
}
1919

2020
// RUN: %sourcekitd-test -req=conformingmethods -pos=12:10 %s -req-opts=expectedtypes='$s8MyModule5ProtoPD' -- -module-name MyModule %s > %t.response.1
21-
// RUN: diff -u %s.response.1 %t.response.1
21+
// RUN: diff --strip-trailing-cr -u %s.response.1 %t.response.1
2222
// RUN: %sourcekitd-test -req=conformingmethods -pos=17:8 %s -req-opts=expectedtypes='$s8MyModule5ProtoPD' -- -module-name MyModule %s > %t.response.2
23-
// RUN: diff -u %s.response.2 %t.response.2
23+
// RUN: diff --strip-trailing-cr -u %s.response.2 %t.response.2

test/SourceKit/CursorInfo/rdar_18677108-2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: -- %S/Inputs/rdar_18677108-2-b.swift \
33
// RUN: %S/Inputs/rdar_18677108-2-a.swift \
44
// RUN: == -req=print-diags %S/Inputs/rdar_18677108-2-a.swift | %sed_clean > %t.response
5-
// RUN: diff -u %s.response %t.response
5+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
66

77

88

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %sourcekitd-test -req=doc-info %S/Inputs/main.swift > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
// RUN: not %sourcekitd-test -req=doc-info %S/Inputs/main.swift -- %S/Inputs/cake.swift 2> %t.error
55
// RUN: %FileCheck %s -check-prefix=MULTI_FILE < %t.error
66

7-
// MULTI_FILE: unexpected input in compiler arguments
7+
// MULTI_FILE: unexpected input in compiler arguments
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %empty-directory(%t.mod)
22
// RUN: %swift -emit-module -o %t.mod/cake.swiftmodule %S/Inputs/cake.swift -parse-as-library -enable-objc-interop -emit-module-doc-path %t.mod/cake.swiftdoc
33
// RUN: %sourcekitd-test -req=doc-info -module cake -- -I %t.mod > %t.response
4-
// RUN: diff -u %s.response %t.response
4+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %empty-directory(%t.mod)
22
// RUN: %swift -emit-module -o %t.mod/cake1.swiftmodule %S/Inputs/cake1.swift -parse-as-library
33
// RUN: %sourcekitd-test -req=doc-info -module cake1 -- -I %t.mod > %t.response
4-
// RUN: diff -u %s.response %t.response
4+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

0 commit comments

Comments
 (0)