mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This adjusts the test diffing to ignore the whitespace changes across different platforms. `raw_fd_ostream` will write out `OF_Text` files with the platform's line endings, which may differ from the source file's.
16 lines
796 B
Swift
16 lines
796 B
Swift
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
|
|
// 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
|
|
// 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
|
|
// RUN: diff --strip-trailing-cr -u %s %t/no_var_to_let.swift.result
|
|
// RUN: %target-swift-frontend -typecheck %s -swift-version 5
|
|
|
|
// Note that the diff run line indicates that there should be no change.
|
|
|
|
// The compiler should not suggest `let` instead of `var` here because
|
|
// it is a compile error to say `for let ...`.
|
|
// rdar://problem/32390726
|
|
|
|
for var i in 0..<10 {
|
|
_ = i + 1
|
|
}
|