Files
swift-mirror/test/Index/Store/record-hashing.swift
David Farler 645aaad551 [index/build] Upstream indexing while building changes
This patch upstreams previously AppleInternal changes for
indexing while building.
2017-06-29 16:20:06 -07:00

23 lines
1013 B
Swift

// RUN: rm -rf %t && mkdir %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.