Skip to content

Commit 115a664

Browse files
committed
Add a test that serialized diagnostics respect VFS filenames too
1 parent 0d054fb commit 115a664

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/Frontend/vfs.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfs/secondary-vfsoverlay.yaml > %t/secondary-overlay.yaml
44
// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfs/tertiary-vfsoverlay.yaml > %t/tertiary-overlay.yaml
55

6-
// RUN: not %target-swift-frontend -vfsoverlay %t/overlay.yaml -typecheck %s %t/mapped-file.swift 2>&1 | %FileCheck -check-prefix=BASIC_MAPPING_ERROR %s
6+
// RUN: not %target-swift-frontend -vfsoverlay %t/overlay.yaml -typecheck %s %t/mapped-file.swift -serialize-diagnostics-path %t/basic.dia 2>&1 | %FileCheck -check-prefix=BASIC_MAPPING_ERROR %s
7+
// RUN: c-index-test -read-diagnostics %t/basic.dia 2>&1 | %FileCheck -check-prefix=BASIC_MAPPING_ERROR %s
78

89
// BASIC_MAPPING_ERROR: {{.*}}/mapped-file.swift:2:17: error:
910

10-
// RUN: not %target-swift-frontend -vfsoverlay %t/overlay.yaml -vfsoverlay %t/secondary-overlay.yaml -vfsoverlay %t/tertiary-overlay.yaml -typecheck %s %t/triple-mapped-swift-file.swift 2>&1 | %FileCheck -check-prefix=COMPLEX_MAPPING_ERROR %s
11+
// RUN: not %target-swift-frontend -vfsoverlay %t/overlay.yaml -vfsoverlay %t/secondary-overlay.yaml -vfsoverlay %t/tertiary-overlay.yaml -typecheck %s %t/triple-mapped-swift-file.swift -serialize-diagnostics-path %t/complex.dia 2>&1 | %FileCheck -check-prefix=COMPLEX_MAPPING_ERROR %s
12+
// RUN: c-index-test -read-diagnostics %t/complex.dia 2>&1 | %FileCheck -check-prefix=COMPLEX_MAPPING_ERROR %s
1113

1214
// COMPLEX_MAPPING_ERROR: {{.*}}/triple-mapped-swift-file.swift:2:17: error:
1315

0 commit comments

Comments
 (0)