Files
swift-mirror/test/Index/Store/record-hashing.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

23 lines
1012 B
Swift

// RUN: %empty-directory(%t)
// RUN: echo "func foo() {}" > %t/theinput.swift
// RUN: %target-swift-frontend -index-store-path %t/idx -typecheck %t/theinput.swift -o %t/s.o
// RUN: ls %t/idx/*/records/* | grep "theinput.swift" | count 1
// RUN: cp -r %t/idx %t/idx-orig
// RUN: touch %t/theinput.swift
// RUN: %target-swift-frontend -index-store-path %t/idx -typecheck %t/theinput.swift -o %t/s.o
// RUN: diff -r -u %t/idx/*/records %t/idx-orig/*/records
// No change in record.
// RUN: echo '// Comment.' >> %t/theinput.swift
// RUN: %target-swift-frontend -index-store-path %t/idx -typecheck %t/theinput.swift -o %t/s.o
// RUN: diff -r -u %t/idx/*/records %t/idx-orig/*/records
// No change in record.
// RUN: echo 'func goo() {}' >> %t/theinput.swift
// RUN: %target-swift-frontend -index-store-path %t/idx -typecheck %t/theinput.swift -o %t/s.o
// RUN: not diff -r -u %t/idx/*/records %t/idx-orig/*/records
// RUN: ls %t/idx/*/records/* | grep "theinput.swift" | count 2
// Changed! Wrote a new record.