Skip to content

Commit aee280a

Browse files
committed
[SourceKit/Testing] Add %diff as an alias for 'diff --strip-trailing-cr'
1 parent c762db1 commit aee280a

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 {

0 commit comments

Comments
 (0)