Skip to content

Commit 76a7160

Browse files
authored
Merge pull request swiftlang#33931 from 3405691582/SedThenDiff
[test] diff --strip-trailing-cr is non-standard.
2 parents c11cb44 + 88167e7 commit 76a7160

14 files changed

+17
-13
lines changed

test/Migrator/double_fixit_ok.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: not %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/double_fixit_ok.result -swift-version 4
3-
// RUN: diff --strip-trailing-cr -u %s.expected %t/double_fixit_ok.result
3+
// RUN: %diff -u %s.expected %t/double_fixit_ok.result
44
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5
55

66
@available(swift, obsoleted: 4, renamed: "Thing.constant___renamed")

test/Migrator/double_fixit_ok.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: not %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/double_fixit_ok.result -swift-version 4
3-
// RUN: diff --strip-trailing-cr -u %s.expected %t/double_fixit_ok.result
3+
// RUN: %diff -u %s.expected %t/double_fixit_ok.result
44
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5
55

66
@available(swift, obsoleted: 4, renamed: "Thing.constant___renamed")

test/Migrator/insert_replace_fixit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/result.swift -swift-version 4
3-
// RUN: diff --strip-trailing-cr -u %s.expected %t/result.swift
3+
// RUN: %diff -u %s.expected %t/result.swift
44

55
import TestMyTime
66

test/Migrator/insert_replace_fixit.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/result.swift -swift-version 4
3-
// RUN: diff --strip-trailing-cr -u %s.expected %t/result.swift
3+
// RUN: %diff -u %s.expected %t/result.swift
44

55
import TestMyTime
66

test/Migrator/no_extraneous_argument_labels.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
22
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 4 -o /dev/null
3-
// RUN: diff --strip-trailing-cr -u %s.expected %t/no_extraneous_argument_labels.result
3+
// RUN: %diff -u %s.expected %t/no_extraneous_argument_labels.result
44
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5
55

66
func foo(_ oc: [String]) {

test/Migrator/no_extraneous_argument_labels.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
22
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 4 -o /dev/null
3-
// RUN: diff --strip-trailing-cr -u %s.expected %t/no_extraneous_argument_labels.result
3+
// RUN: %diff -u %s.expected %t/no_extraneous_argument_labels.result
44
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5
55

66
func foo(_ oc: [String]) {

test/Migrator/no_var_to_let.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
22
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null
33
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null
4-
// RUN: diff --strip-trailing-cr -u %s %t/no_var_to_let.swift.result
4+
// RUN: %diff -u %s %t/no_var_to_let.swift.result
55
// RUN: %target-swift-frontend -typecheck %s -swift-version 5
66

77
// Note that the diff run line indicates that there should be no change.

test/Migrator/null_migration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/migrated_null_migration.swift -emit-remap-file-path %t/null_migration.remap -o /dev/null
2-
// RUN: diff --strip-trailing-cr -u %s %t/migrated_null_migration.swift
2+
// RUN: %diff -u %s %t/migrated_null_migration.swift
33

44
// This file tests that, if all migration passes are no-op,
55
// there are no changes to the file.

test/Migrator/optional_try_migration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -c -swift-version 4 -primary-file %s -emit-migrated-file-path %t/optional_try_migration.result.swift
3-
// RUN: diff --strip-trailing-cr -u %S/optional_try_migration.swift.expected %t/optional_try_migration.result.swift
3+
// RUN: %diff -u %S/optional_try_migration.swift.expected %t/optional_try_migration.result.swift
44

55
func fetchOptInt() throws -> Int? {
66
return 3

test/Migrator/optional_try_migration.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -c -swift-version 4 -primary-file %s -emit-migrated-file-path %t/optional_try_migration.result.swift
3-
// RUN: diff --strip-trailing-cr -u %S/optional_try_migration.swift.expected %t/optional_try_migration.result.swift
3+
// RUN: %diff -u %S/optional_try_migration.swift.expected %t/optional_try_migration.result.swift
44

55
func fetchOptInt() throws -> Int? {
66
return 3

0 commit comments

Comments
 (0)