diff --git a/test/SILGen/magic_identifier_file_conflicting.swift.gyb b/test/SILGen/magic_identifier_file_conflicting.swift.gyb index 350304b90936d..d0700178c9982 100644 --- a/test/SILGen/magic_identifier_file_conflicting.swift.gyb +++ b/test/SILGen/magic_identifier_file_conflicting.swift.gyb @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) // RUN: %gyb -D TEMPDIR=%t %s > %t/magic_identifier_file_conflicting.swift -// RUN: %{python} -c "import sys; t = open(sys.argv[1], 'rb').read().replace('\r\n', '\n'); open(sys.argv[1], 'wb').write(t)" %t/magic_identifier_file_conflicting.swift +// RUN: %{python} -c "import io; import sys; t = io.open(sys.argv[1], 'r', encoding='utf-8').read().replace('\r\n', '\n'); io.open(sys.argv[1], 'w', encoding='utf-8', newline='\n').write(t)" %t/magic_identifier_file_conflicting.swift // We want to check both the diagnostics and the SIL output. // RUN: %target-swift-emit-silgen -verify -emit-sorted-sil -enable-experimental-concise-pound-file -module-name Foo %t/magic_identifier_file_conflicting.swift %S/Inputs/magic_identifier_file_conflicting_other.swift | %FileCheck %s