Skip to content

Commit 2265d6e

Browse files
committed
tests: adjust the SourceKit tests for line endings (NFCI)
This adjusts the tests for the difference between line endings on different platforms. Windows uses CRLF while most Unicies use LF. This was exposed during the update to the new LLVM snapshot.
1 parent 29268e2 commit 2265d6e

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

Diff for: test/SourceKit/CodeComplete/complete_constructor.swift

+1-1
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

Diff for: test/SourceKit/CodeComplete/complete_member.swift

+1-1
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

Diff for: test/SourceKit/CodeComplete/complete_override.swift

+1-1
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

Diff for: test/SourceKit/CodeComplete/complete_unresolvedmember.swift

+1-1
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

Diff for: test/SourceKit/ConformingMethods/basic.swift

+1-1
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

Diff for: test/SourceKit/ConformingMethods/generics.swift

+2-2
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

Diff for: test/SourceKit/CursorInfo/rdar_18677108-2.swift

+1-1
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

Diff for: test/SourceKit/DocSupport/doc_source_file.swift

+2-2
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

Diff for: test/SourceKit/DocSupport/doc_swift_module.swift

+1-1
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

Diff for: test/SourceKit/DocSupport/doc_swift_module1.swift

+1-1
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

Diff for: test/SourceKit/DocumentStructure/access_parse.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// RUN: %swift -typecheck %S/Inputs/access.swift
22
// RUN: %sourcekitd-test -req=structure %S/Inputs/access.swift -- -module-name Access %S/Inputs/access.swift > %t.response
3-
// RUN: diff -u %s.response %t.response
3+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

Diff for: test/SourceKit/DocumentStructure/mark_edit.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// RUN: %sourcekitd-test -req=structure -pos=1:1 -length=0 -replace=" " %S/Inputs/mark.swift > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

Diff for: test/SourceKit/DocumentStructure/structure.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// RUN: %sourcekitd-test -req=structure %S/Inputs/main.swift -- -module-name StructureTest %S/Inputs/main.swift | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
// RUN: %sourcekitd-test -req=structure %S/Inputs/invalid.swift | %sed_clean > %t.invalid.response
5-
// RUN: diff -u %s.invalid.response %t.invalid.response
5+
// RUN: diff --strip-trailing-cr -u %s.invalid.response %t.invalid.response
66

77
// RUN: %sourcekitd-test -req=structure %S/../Inputs/placeholders.swift | %sed_clean > %t.placeholders.response
8-
// RUN: diff -u %s.placeholders.response %t.placeholders.response
8+
// RUN: diff --strip-trailing-cr -u %s.placeholders.response %t.placeholders.response
99

1010
// RUN: %sourcekitd-test -req=structure %S/Inputs/main.swift -name -foobar | %sed_clean > %t.foobar.response
11-
// RUN: diff -u %s.foobar.response %t.foobar.response
11+
// RUN: diff --strip-trailing-cr -u %s.foobar.response %t.foobar.response
1212

1313
// RUN: %sourcekitd-test -req=structure -text-input %S/Inputs/main.swift | %sed_clean > %t.empty.response
14-
// RUN: diff -u %s.empty.response %t.empty.response
14+
// RUN: diff --strip-trailing-cr -u %s.empty.response %t.empty.response
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sourcekitd-test -req=structure %s -- -module-name StructureTest %s | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
let color: S = #colorLiteral(red: 1, green: 0, blue: 0, alpha: 1)
55
let image: I? = #imageLiteral(resourceName: "hello.png")

Diff for: test/SourceKit/DocumentStructure/structure_object_literals.swift.response

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
{
22
key.offset: 0,
3-
key.length: 267,
3+
key.length: 287,
44
key.diagnostic_stage: source.diagnostic.stage.swift.parse,
55
key.substructure: [
66
{
77
key.kind: source.lang.swift.decl.var.global,
88
key.accessibility: source.lang.swift.accessibility.internal,
99
key.name: "color",
10-
key.offset: 144,
10+
key.offset: 164,
1111
key.length: 65,
1212
key.typename: "S",
13-
key.nameoffset: 148,
13+
key.nameoffset: 168,
1414
key.namelength: 5
1515
},
1616
{
1717
key.kind: source.lang.swift.expr.object_literal,
1818
key.name: "colorLiteral",
19-
key.offset: 159,
19+
key.offset: 179,
2020
key.length: 50,
21-
key.nameoffset: 160,
21+
key.nameoffset: 180,
2222
key.namelength: 12,
23-
key.bodyoffset: 172,
23+
key.bodyoffset: 192,
2424
key.bodylength: 36,
2525
key.substructure: [
2626
{
2727
key.kind: source.lang.swift.expr.argument,
2828
key.name: "red",
29-
key.offset: 173,
29+
key.offset: 193,
3030
key.length: 6,
31-
key.nameoffset: 173,
31+
key.nameoffset: 193,
3232
key.namelength: 3,
33-
key.bodyoffset: 178,
33+
key.bodyoffset: 198,
3434
key.bodylength: 1
3535
},
3636
{
3737
key.kind: source.lang.swift.expr.argument,
3838
key.name: "green",
39-
key.offset: 181,
39+
key.offset: 201,
4040
key.length: 8,
41-
key.nameoffset: 181,
41+
key.nameoffset: 201,
4242
key.namelength: 5,
43-
key.bodyoffset: 188,
43+
key.bodyoffset: 208,
4444
key.bodylength: 1
4545
},
4646
{
4747
key.kind: source.lang.swift.expr.argument,
4848
key.name: "blue",
49-
key.offset: 191,
49+
key.offset: 211,
5050
key.length: 7,
51-
key.nameoffset: 191,
51+
key.nameoffset: 211,
5252
key.namelength: 4,
53-
key.bodyoffset: 197,
53+
key.bodyoffset: 217,
5454
key.bodylength: 1
5555
},
5656
{
5757
key.kind: source.lang.swift.expr.argument,
5858
key.name: "alpha",
59-
key.offset: 200,
59+
key.offset: 220,
6060
key.length: 8,
61-
key.nameoffset: 200,
61+
key.nameoffset: 220,
6262
key.namelength: 5,
63-
key.bodyoffset: 207,
63+
key.bodyoffset: 227,
6464
key.bodylength: 1
6565
}
6666
]
@@ -69,30 +69,30 @@
6969
key.kind: source.lang.swift.decl.var.global,
7070
key.accessibility: source.lang.swift.accessibility.internal,
7171
key.name: "image",
72-
key.offset: 210,
72+
key.offset: 230,
7373
key.length: 56,
7474
key.typename: "I?",
75-
key.nameoffset: 214,
75+
key.nameoffset: 234,
7676
key.namelength: 5
7777
},
7878
{
7979
key.kind: source.lang.swift.expr.object_literal,
8080
key.name: "imageLiteral",
81-
key.offset: 226,
81+
key.offset: 246,
8282
key.length: 40,
83-
key.nameoffset: 227,
83+
key.nameoffset: 247,
8484
key.namelength: 12,
85-
key.bodyoffset: 239,
85+
key.bodyoffset: 259,
8686
key.bodylength: 26,
8787
key.substructure: [
8888
{
8989
key.kind: source.lang.swift.expr.argument,
9090
key.name: "resourceName",
91-
key.offset: 240,
91+
key.offset: 260,
9292
key.length: 25,
93-
key.nameoffset: 240,
93+
key.nameoffset: 260,
9494
key.namelength: 12,
95-
key.bodyoffset: 254,
95+
key.bodyoffset: 274,
9696
key.bodylength: 11
9797
}
9898
]

Diff for: test/SourceKit/ExtractComment/extract_comments.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/DocComment1.swift > %t.DocComment1.response
2-
// RUN: diff -u %s.DocComment1.response %t.DocComment1.response
2+
// RUN: diff --strip-trailing-cr -u %s.DocComment1.response %t.DocComment1.response
33

44
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/DocComment2.swift > %t.DocComment2.response
5-
// RUN: diff -u %s.DocComment2.response %t.DocComment2.response
5+
// RUN: diff --strip-trailing-cr -u %s.DocComment2.response %t.DocComment2.response
66

77
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/DocComment3.swift > %t.DocComment3.response
8-
// RUN: diff -u %s.DocComment3.response %t.DocComment3.response
8+
// RUN: diff --strip-trailing-cr -u %s.DocComment3.response %t.DocComment3.response
99

1010
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/DocCommentEmptyLine1.swift > %t.DocCommentEmptyLine1.response
11-
// RUN: diff -u %s.DocCommentEmptyLine1.response %t.DocCommentEmptyLine1.response
11+
// RUN: diff --strip-trailing-cr -u %s.DocCommentEmptyLine1.response %t.DocCommentEmptyLine1.response
1212

1313
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/DocCommentEmptyLine2.swift > %t.DocCommentEmptyLine2.response
14-
// RUN: diff -u %s.DocCommentEmptyLine2.response %t.DocCommentEmptyLine2.response
14+
// RUN: diff --strip-trailing-cr -u %s.DocCommentEmptyLine2.response %t.DocCommentEmptyLine2.response
1515

1616
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/DocCommentEmptyLine3.swift > %t.DocCommentEmptyLine3.response
17-
// RUN: diff -u %s.DocCommentEmptyLine3.response %t.DocCommentEmptyLine3.response
17+
// RUN: diff --strip-trailing-cr -u %s.DocCommentEmptyLine3.response %t.DocCommentEmptyLine3.response
1818

1919
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/Comment1.swift > %t.Comment1.response
20-
// RUN: diff -u %s.Comment1.response %t.Comment1.response
20+
// RUN: diff --strip-trailing-cr -u %s.Comment1.response %t.Comment1.response
2121

2222
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/CommentIndent1.swift > %t.CommentIndent1.response
23-
// RUN: diff -u %s.CommentIndent1.response %t.CommentIndent1.response
23+
// RUN: diff --strip-trailing-cr -u %s.CommentIndent1.response %t.CommentIndent1.response
2424

2525
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/CommentIndent2.swift > %t.CommentIndent2.response
26-
// RUN: diff -u %s.CommentIndent2.response %t.CommentIndent2.response
26+
// RUN: diff --strip-trailing-cr -u %s.CommentIndent2.response %t.CommentIndent2.response
2727

2828
// RUN: %sourcekitd-test -req=extract-comment -pass-as-sourcetext %S/Inputs/NotComment1.swift

Diff for: test/SourceKit/Indexing/index_big_array.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// RUN: %sourcekitd-test -req=index %S/../Inputs/big_array.swift -- %S/../Inputs/big_array.swift | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

Diff for: test/SourceKit/Indexing/index_enum_case.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sourcekitd-test -req=index %s -- -Xfrontend -serialize-diagnostics-path -Xfrontend %t.dia %s | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
public enum E {
55

Diff for: test/SourceKit/Indexing/index_forbid_typecheck.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// RUN: %sourcekitd-test -req=index %S/../Inputs/forbid_typecheck_primary.swift -- -Xfrontend -debug-forbid-typecheck-prefix -Xfrontend NOTYPECHECK %S/../Inputs/forbid_typecheck_2.swift %S/../Inputs/forbid_typecheck_primary.swift -module-name forbid_typecheck | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

Diff for: test/SourceKit/Indexing/index_func_import.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %swift -emit-module -o %t/test_module.swiftmodule %S/Inputs/test_module.swift
33

44
// RUN: %sourcekitd-test -req=index %s -- %s -I %t | %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
import func test_module.globalFunc
88

Diff for: test/SourceKit/Indexing/index_implicit_vis.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %sourcekitd-test -req=index %S/Inputs/implicit-vis/a.swift -- %S/Inputs/implicit-vis/a.swift %S/Inputs/implicit-vis/b.swift -o implicit_vis.o | %sed_clean > %t.a.response
22
// RUN: %sourcekitd-test -req=index %S/Inputs/implicit-vis/b.swift -- %S/Inputs/implicit-vis/a.swift %S/Inputs/implicit-vis/b.swift -o implicit_vis.o | %sed_clean > %t.b.response
3-
// RUN: diff -u %S/Inputs/implicit-vis/a.index.response %t.a.response
4-
// RUN: diff -u %S/Inputs/implicit-vis/b.index.response %t.b.response
3+
// RUN: diff --strip-trailing-cr -u %S/Inputs/implicit-vis/a.index.response %t.a.response
4+
// RUN: diff --strip-trailing-cr -u %S/Inputs/implicit-vis/b.index.response %t.b.response

Diff for: test/SourceKit/Indexing/index_operators.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sourcekitd-test -req=index %s -- -Xfrontend -serialize-diagnostics-path -Xfrontend %t.dia %s | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
class ClassA {
55
init(){}

Diff for: test/SourceKit/Indexing/index_with_swift_module.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: %sourcekitd-test -req=index %s -- %s -I %t | %FileCheck %s
55

66
// RUN: %sourcekitd-test -req=index %t/test_module.swiftmodule | %sed_clean > %t.response
7-
// RUN: diff -u %S/Inputs/test_module.index.response %t.response
7+
// RUN: diff --strip-trailing-cr -u %S/Inputs/test_module.index.response %t.response
88

99
import test_module
1010

Diff for: test/SourceKit/Indexing/rdar_21602898.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sourcekitd-test -req=index %s -- -Xfrontend -serialize-diagnostics-path -Xfrontend %t.dia %s | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
protocol P {}
55
class C {

Diff for: test/SourceKit/Indexing/sr_3815.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sourcekitd-test -req=index %s -- -Xfrontend -serialize-diagnostics-path -Xfrontend %t.dia %s | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

44
protocol P {
55
typealias Index = Int

Diff for: test/SourceKit/InterfaceGen/gen_swift_module.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func f(s : inout [Int]) {
88
// RUN: %empty-directory(%t.mod/mcp)
99
// RUN: %swift -emit-module -o %t.mod/swift_mod.swiftmodule %S/Inputs/swift_mod.swift -parse-as-library
1010
// RUN: %sourcekitd-test -req=interface-gen -module swift_mod -- -I %t.mod > %t.response
11-
// RUN: diff -u %s.response %t.response
11+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
1212

1313
// RUN: %sourcekitd-test -req=module-groups -module swift_mod -- -I %t.mod | %FileCheck -check-prefix=GROUP-EMPTY %s
1414
// GROUP-EMPTY: <GROUPS>
@@ -32,4 +32,4 @@ func f(s : inout [Int]) {
3232
// RUN: %empty-directory(%t.mod)
3333
// RUN: %swift -emit-module -o /dev/null -emit-module-interface-path %t.mod/swift_mod.swiftinterface -O %S/Inputs/swift_mod.swift -parse-as-library
3434
// RUN: %sourcekitd-test -req=interface-gen -module swift_mod -- -I %t.mod -module-cache-path %t.mod/mcp > %t.response
35-
// RUN: diff -u %s.from_swiftinterface.response %t.response
35+
// RUN: diff --strip-trailing-cr -u %s.from_swiftinterface.response %t.response

Diff for: test/SourceKit/InterfaceGen/gen_swiftonly_systemmodule.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: %s
1010

1111
// RUN: %sourcekitd-test -req=interface-gen -module SomeModule -- -sdk %t/SDK -Fsystem %t/SDK/Frameworks -target %target-triple > %t.response
12-
// RUN: diff -u %s.response %t.response
12+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
1313

1414
public struct SomeValue {
1515
internal var internalValue: Int { return 1 }

Diff for: test/SourceKit/MarkupXML/basic.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// RUN: %sourcekitd-test -req=markup-xml -pass-as-sourcetext %S/Input/DocComment1.md > %t.DocComment1.response
2-
// RUN: diff -u %s.DocComment1.response %t.DocComment1.response
2+
// RUN: diff --strip-trailing-cr -u %s.DocComment1.response %t.DocComment1.response

Diff for: test/SourceKit/Sema/enum-toraw/enum-toraw.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// RUN: %sourcekitd-test -req=sema %S/Inputs/t2.swift -- %S/Inputs/t1.swift %S/Inputs/t2.swift | %sed_clean > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response
33

Diff for: test/SourceKit/Sema/placeholders.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// RUN: %sourcekitd-test -req=sema %S/../Inputs/placeholders.swift -- %S/../Inputs/placeholders.swift | %sed_clean > %t.placeholders.response
2-
// RUN: diff -u %s.placeholders.response %t.placeholders.response
2+
// RUN: diff --strip-trailing-cr -u %s.placeholders.response %t.placeholders.response

Diff for: test/SourceKit/Sema/sema_big_array.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// RUN: %sourcekitd-test -req=sema %S/../Inputs/big_array.swift -- %S/../Inputs/big_array.swift > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

Diff for: test/SourceKit/Sema/sema_config.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ x = 2
77
#endif
88

99
// RUN: %sourcekitd-test -req=sema %s -- %s > %t.false.response
10-
// RUN: diff -u %s.false.response %t.false.response
10+
// RUN: diff --strip-trailing-cr -u %s.false.response %t.false.response
1111
// RUN: %sourcekitd-test -req=sema %s -- %s -D FOO > %t.true.response
12-
// RUN: diff -u %s.true.response %t.true.response
12+
// RUN: diff --strip-trailing-cr -u %s.true.response %t.true.response

Diff for: test/SourceKit/Sema/sema_edits.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ print("hello")
66
// RUN: %sourcekitd-test -req=open %s -- %s == -req=edit -pos=3:5 -replace="}" -length=0 %s == \
77
// RUN: -req=edit -pos=3:1 -replace="}" -length=5 %s == \
88
// RUN: -req=print-annotations %s > %t.response
9-
// RUN: diff -u %s.response %t.response
9+
// RUN: diff --strip-trailing-cr -u %s.response %t.response

Diff for: test/SourceKit/Sema/sema_forbid_typecheck.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %sourcekitd-test -req=sema %S/../Inputs/forbid_typecheck_primary.swift -- \
22
// RUN: -Xfrontend -debug-forbid-typecheck-prefix -Xfrontend NOTYPECHECK -module-name forbid \
33
// RUN: %S/../Inputs/forbid_typecheck_2.swift %S/../Inputs/forbid_typecheck_primary.swift > %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)