Files
swift-mirror/test/Migrator/always_remove_old_remap_file.swift
Saleem Abdulrasool b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00

15 lines
765 B
Swift

// RUN: %empty-directory(%t)
// RUN: cp %s %t/input.swift
// RUN: %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap -o /dev/null
// RUN: ls %t/always_remove_old_remap_file.remap
// Simulate leaving behind code that can't build in Swift 4:
// RUN: echo asdfads >> %t/input.swift
// Migrate again. This should delete the old remap file.
// RUN: not %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap -o /dev/null
// RUN: not ls %t/always_remove_old_remap_file.remap
func foo() {}