Skip to content

Commit a5fa431

Browse files
authored
Merge pull request swiftlang#30890 from rintaro/sourcekit-test-diff
[SourceKit/Testing] Add %diff as an alias for 'diff --strip-trailing-cr'
2 parents aec2c7b + aee280a commit a5fa431

File tree

80 files changed

+209
-208
lines changed

Some content is hidden

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

80 files changed

+209
-208
lines changed

test/SourceKit/CodeComplete/complete_annotateddescription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ func test(value: MyStruct) {
1111
}
1212

1313
// RUN: %sourcekitd-test -req=complete -pos=10:8 -req-opts=annotateddescription=1 %s -- %s > %t.result
14-
// RUN: diff --strip-trailing-cr -u %s.result %t.result
14+
// RUN: %diff -u %s.result %t.result

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 --strip-trailing-cr -u %s.response %t.response
10+
// RUN: %diff -u %s.response %t.response

test/SourceKit/CodeComplete/complete_filter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func foo() {
3434
// RUN: %sourcekitd-test -req=complete.open -pos=11:5 %s -- %s \
3535
// RUN: == -req=complete.update -pos=11:5 -req-opts=filtertext=a %s -- %s > %t.both
3636
// RUN: cat %t.all %t.a > %t.both.check
37-
// RUN: diff -u %t.both %t.both.check
37+
// RUN: %diff -u %t.both %t.both.check
3838

3939
// RUN: %sourcekitd-test -req=complete.open -pos=11:5 \
4040
// RUN: -req-opts=filtertext=b %s -- %s > %t.b

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 --strip-trailing-cr -u %s.response %t.response
43+
// RUN: %diff -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_optionalmethod.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ func test<T : Proto>(obj: T) {
77
}
88

99
// RUN: %sourcekitd-test -req=complete -pos=6:15 %s -- %s > %t.response
10-
// RUN: diff -u %s.response %t.response
10+
// RUN: %diff -u %s.response %t.response
1111
// REQUIRES: objc_interop

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 --strip-trailing-cr -u %s.response %t.response
9+
// RUN: %diff -u %s.response %t.response
1010

test/SourceKit/CodeComplete/complete_sort_order.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func test() {
1212
// RUN: %sourcekitd-test -req=complete -req-opts=hidelowpriority=0,sort.byname=0 -pos=7:1 %s -- %s > %t.orig.off
1313
// RUN: %FileCheck -check-prefix=NAME_SORTED %s < %t.orig
1414
// RUN: %FileCheck -check-prefix=NAME_UNSORTED %s < %t.orig.off
15-
// RUN: not diff -u %t.orig %t.orig.off
15+
// RUN: not %diff -u %t.orig %t.orig.off
1616

1717
// Make sure the order is as below, foo(Int) should come before foo(String).
1818
// NAME_SORTED: key.description: "#column"

test/SourceKit/CodeComplete/complete_typerelation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ func testUnknown() {
3131
}
3232

3333
// RUN: %sourcekitd-test -req=complete -pos=13:17 %s -- %s > %t.identical.response
34-
// RUN: diff --strip-trailing-cr -u %s.identical.response %t.identical.response
34+
// RUN: %diff -u %s.identical.response %t.identical.response
3535

3636
// RUN: %sourcekitd-test -req=complete -pos=17:17 %s -- %s > %t.convertible.response
37-
// RUN: diff --strip-trailing-cr -u %s.convertible.response %t.convertible.response
37+
// RUN: %diff -u %s.convertible.response %t.convertible.response
3838

3939
// RUN: %empty-directory(%t/cache)
4040
// RUN: %sourcekitd-test -req=complete.cache.ondisk -cache-path %t/cache == -req=complete -pos=21:10 %s -- %s | %FileCheck %s --check-prefix=BOOLCONTEXT

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 --strip-trailing-cr -u %s.response %t.response
15+
// RUN: %diff -u %s.response %t.response
1616

test/SourceKit/CodeComplete/complete_update.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func foo() {
2222
// CHECK: key.kind: source.lang.swift.codecomplete.group
2323

2424
// RUN: cat %t.open %t.open %t.open > %t.check
25-
// RUN: diff -u %t.update %t.check
25+
// RUN: %diff -u %t.update %t.check
2626

2727

2828
struct X {

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 --strip-trailing-cr -u %s.response %t.response
30+
// RUN: %diff -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 --strip-trailing-cr -u %s.response.1 %t.response.1
21+
// RUN: %diff -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 --strip-trailing-cr -u %s.response.2 %t.response.2
23+
// RUN: %diff -u %s.response.2 %t.response.2

test/SourceKit/CursorInfo/cursor_usr.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func foo(x: FooStruct1) -> S1 {}
1515
// RUN: %sourcekitd-test -req=cursor -usr "s:10cursor_usr2S1V" %s -- -I %t -F %S/../Inputs/libIDE-mock-sdk %s > %t.from_usr.txt
1616
// RUN: %FileCheck %s -check-prefix=CHECK_SANITY1 < %t.from_offset.txt
1717
// RUN: %FileCheck %s -check-prefix=CHECK_SANITY1 < %t.from_usr.txt
18-
// RUN: diff -u %t.from_usr.txt %t.from_offset.txt
18+
// RUN: %diff -u %t.from_usr.txt %t.from_offset.txt
1919
// CHECK_SANITY1: source.lang.swift.decl.struct (5:8-5:10)
2020
// CHECK_SANITY1-NEXT: S1
2121
// CHECK_SANITY1-NEXT: s:10cursor_usr2S1

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 --strip-trailing-cr -u %s.response %t.response
5+
// RUN: %diff -u %s.response %t.response
66

77

88

test/SourceKit/DocSupport/doc_clang_module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
// RUN: %sourcekitd-test -req=doc-info -module Foo -- -F %S/../Inputs/libIDE-mock-sdk \
1010
// RUN: -target %target-triple %clang-importer-sdk-nosource -I %t | %sed_clean > %t.response
11-
// RUN: diff -u %s.response %t.response
11+
// RUN: %diff -u %s.response %t.response

test/SourceKit/DocSupport/doc_source_file.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sourcekitd-test -req=doc-info %S/Inputs/main.swift > %t.response
2-
// RUN: diff --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -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
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 --strip-trailing-cr -u %s.response %t.response
4+
// RUN: %diff -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 --strip-trailing-cr -u %s.response %t.response
4+
// RUN: %diff -u %s.response %t.response

test/SourceKit/DocSupport/doc_swift_module_cross_import.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
// Check doc info shows the decls from each of A's cross-import overlays and lists the required bystander modules.
55
//
66
// RUN: %sourcekitd-test -req=doc-info -module A -- -I %S/../Inputs/CrossImport -module-cache-path %t.mod/mcp > %t.response
7-
// RUN: diff --strip-trailing-cr -u %s.A.response %t.response
7+
// RUN: %diff -u %s.A.response %t.response
88

99
// Set up a cross-import module with doc comments and check the synthesized comments don't appear in the fully_annotated_decl entries.
1010
//
1111
// RUN: %target-swift-frontend -emit-module-path %t.mod/_OtherCAdditions.swiftmodule -emit-module-doc-path %t.mod/_OtherCAdditions.swiftdoc -module-cache-path %t.mod/mcp -I %S/../Inputs/CrossImport %S/../Inputs/CrossImport/_OtherCAdditions.swift -parse-as-library -enable-cross-import-overlays
1212
// RUN: %sourcekitd-test -req=doc-info -module Other -- -target %target-triple -I %S/../Inputs/CrossImport -I %t.mod/ -module-cache-path %t.mod/mcp > %t.response
13-
// RUN: diff --strip-trailing-cr -u %s.Other.response %t.response
13+
// RUN: %diff -u %s.Other.response %t.response
1414

Lines changed: 1 addition & 1 deletion
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 --strip-trailing-cr -u %s.response %t.response
3+
// RUN: %diff -u %s.response %t.response
Lines changed: 1 addition & 1 deletion
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 --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -u %s.response %t.response
Lines changed: 5 additions & 5 deletions
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 --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -u %s.response %t.response
33

44
// RUN: %sourcekitd-test -req=structure %S/Inputs/invalid.swift | %sed_clean > %t.invalid.response
5-
// RUN: diff --strip-trailing-cr -u %s.invalid.response %t.invalid.response
5+
// RUN: %diff -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 --strip-trailing-cr -u %s.placeholders.response %t.placeholders.response
8+
// RUN: %diff -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 --strip-trailing-cr -u %s.foobar.response %t.foobar.response
11+
// RUN: %diff -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 --strip-trailing-cr -u %s.empty.response %t.empty.response
14+
// RUN: %diff -u %s.empty.response %t.empty.response
Lines changed: 1 addition & 1 deletion
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 --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -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")

test/SourceKit/DocumentStructure/structure_object_literals.swift.response

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
{
22
key.offset: 0,
3-
key.length: 287,
3+
key.length: 268,
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: 164,
10+
key.offset: 145,
1111
key.length: 65,
1212
key.typename: "S",
13-
key.nameoffset: 168,
13+
key.nameoffset: 149,
1414
key.namelength: 5
1515
},
1616
{
1717
key.kind: source.lang.swift.expr.object_literal,
1818
key.name: "colorLiteral",
19-
key.offset: 179,
19+
key.offset: 160,
2020
key.length: 50,
21-
key.nameoffset: 180,
21+
key.nameoffset: 161,
2222
key.namelength: 12,
23-
key.bodyoffset: 192,
23+
key.bodyoffset: 173,
2424
key.bodylength: 36,
2525
key.substructure: [
2626
{
2727
key.kind: source.lang.swift.expr.argument,
2828
key.name: "red",
29-
key.offset: 193,
29+
key.offset: 174,
3030
key.length: 6,
31-
key.nameoffset: 193,
31+
key.nameoffset: 174,
3232
key.namelength: 3,
33-
key.bodyoffset: 198,
33+
key.bodyoffset: 179,
3434
key.bodylength: 1
3535
},
3636
{
3737
key.kind: source.lang.swift.expr.argument,
3838
key.name: "green",
39-
key.offset: 201,
39+
key.offset: 182,
4040
key.length: 8,
41-
key.nameoffset: 201,
41+
key.nameoffset: 182,
4242
key.namelength: 5,
43-
key.bodyoffset: 208,
43+
key.bodyoffset: 189,
4444
key.bodylength: 1
4545
},
4646
{
4747
key.kind: source.lang.swift.expr.argument,
4848
key.name: "blue",
49-
key.offset: 211,
49+
key.offset: 192,
5050
key.length: 7,
51-
key.nameoffset: 211,
51+
key.nameoffset: 192,
5252
key.namelength: 4,
53-
key.bodyoffset: 217,
53+
key.bodyoffset: 198,
5454
key.bodylength: 1
5555
},
5656
{
5757
key.kind: source.lang.swift.expr.argument,
5858
key.name: "alpha",
59-
key.offset: 220,
59+
key.offset: 201,
6060
key.length: 8,
61-
key.nameoffset: 220,
61+
key.nameoffset: 201,
6262
key.namelength: 5,
63-
key.bodyoffset: 227,
63+
key.bodyoffset: 208,
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: 230,
72+
key.offset: 211,
7373
key.length: 56,
7474
key.typename: "I?",
75-
key.nameoffset: 234,
75+
key.nameoffset: 215,
7676
key.namelength: 5
7777
},
7878
{
7979
key.kind: source.lang.swift.expr.object_literal,
8080
key.name: "imageLiteral",
81-
key.offset: 246,
81+
key.offset: 227,
8282
key.length: 40,
83-
key.nameoffset: 247,
83+
key.nameoffset: 228,
8484
key.namelength: 12,
85-
key.bodyoffset: 259,
85+
key.bodyoffset: 240,
8686
key.bodylength: 26,
8787
key.substructure: [
8888
{
8989
key.kind: source.lang.swift.expr.argument,
9090
key.name: "resourceName",
91-
key.offset: 260,
91+
key.offset: 241,
9292
key.length: 25,
93-
key.nameoffset: 260,
93+
key.nameoffset: 241,
9494
key.namelength: 12,
95-
key.bodyoffset: 274,
95+
key.bodyoffset: 255,
9696
key.bodylength: 11
9797
}
9898
]
Lines changed: 9 additions & 9 deletions
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 --strip-trailing-cr -u %s.DocComment1.response %t.DocComment1.response
2+
// RUN: %diff -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 --strip-trailing-cr -u %s.DocComment2.response %t.DocComment2.response
5+
// RUN: %diff -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 --strip-trailing-cr -u %s.DocComment3.response %t.DocComment3.response
8+
// RUN: %diff -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 --strip-trailing-cr -u %s.DocCommentEmptyLine1.response %t.DocCommentEmptyLine1.response
11+
// RUN: %diff -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 --strip-trailing-cr -u %s.DocCommentEmptyLine2.response %t.DocCommentEmptyLine2.response
14+
// RUN: %diff -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 --strip-trailing-cr -u %s.DocCommentEmptyLine3.response %t.DocCommentEmptyLine3.response
17+
// RUN: %diff -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 --strip-trailing-cr -u %s.Comment1.response %t.Comment1.response
20+
// RUN: %diff -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 --strip-trailing-cr -u %s.CommentIndent1.response %t.CommentIndent1.response
23+
// RUN: %diff -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 --strip-trailing-cr -u %s.CommentIndent2.response %t.CommentIndent2.response
26+
// RUN: %diff -u %s.CommentIndent2.response %t.CommentIndent2.response
2727

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

test/SourceKit/Indexing/index.swift

Lines changed: 1 addition & 1 deletion
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 | sed -e 's/key.usr: \".*\"/key.usr: <usr>/g' > %t.response
2-
// RUN: diff -u %s.response %t.response
2+
// RUN: %diff -u %s.response %t.response
33

44
var globV: Int
55

test/SourceKit/Indexing/index_bad_modulename.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33
// RUN: %sourcekitd-test -req=index %s -- %s -module-name Swift -target %target-triple %clang-importer-sdk-nosource -I %t | %sed_clean > %t.response1
4-
// RUN: diff -u %s.response %t.response1
4+
// RUN: %diff -u %s.response %t.response1
55
// RUN: %sourcekitd-test -req=index %s -- %s -module-name 12345 -target %target-triple %clang-importer-sdk-nosource -I %t | %sed_clean > %t.response2
6-
// RUN: diff -u %s.response %t.response2
6+
// RUN: %diff -u %s.response %t.response2
77

88
import ObjectiveC
99
let v: NSObject?
Lines changed: 1 addition & 1 deletion
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 --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -u %s.response %t.response

test/SourceKit/Indexing/index_constructors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
22

33
// RUN: %sourcekitd-test -req=index %s -- %s %S/Inputs/index_constructors_other.swift -module-name index_constructors | %sed_clean > %t.response
4-
// RUN: diff -u %s.response %t.response
4+
// RUN: %diff -u %s.response %t.response
55

66
import Foundation
77

test/SourceKit/Indexing/index_enum_case.swift

Lines changed: 1 addition & 1 deletion
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 --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -u %s.response %t.response
33

44
public enum E {
55

Lines changed: 1 addition & 1 deletion
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 --strip-trailing-cr -u %s.response %t.response
2+
// RUN: %diff -u %s.response %t.response

0 commit comments

Comments
 (0)