Skip to content

Commit 44cd3ff

Browse files
committed
Handle Windows Paths in CompileNotifications Tests
On Windows, JSON output creates paths with `\\` separators, so pass --enable-yaml-compatibility to handle it properly.
1 parent 8a849b3 commit 44cd3ff

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

test/SourceKit/CompileNotifications/code-completion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %sourcekitd-test -req=track-compiles == -req=complete %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1
1+
// RUN: %sourcekitd-test -req=track-compiles == -req=complete %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
22
// COMPILE_1: {
33
// COMPILE_1: key.notification: source.notification.compile-will-start,
44
// COMPILE_1: key.filepath: "SOURCE_DIR{{.*}}code-completion.swift",

test/SourceKit/CompileNotifications/cursor-info.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %sourcekitd-test -req=track-compiles == -req=cursor %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1
1+
// RUN: %sourcekitd-test -req=track-compiles == -req=cursor %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
22
// COMPILE_1: {
33
// COMPILE_1: key.notification: source.notification.compile-will-start,
44
// COMPILE_1: key.filepath: "SOURCE_DIR{{.*}}cursor-info.swift",

test/SourceKit/CompileNotifications/enable-disable.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
// NONE-NOT: compile-did-finish
77

88

9-
// RUN: %sourcekitd-test -req=track-compiles == -req=sema %s -- %s | %FileCheck %s -check-prefix=COMPILE_1
10-
// RUN: %sourcekitd-test -req=track-compiles == -req=track-compiles == -req=sema %s -- %s | %FileCheck %s -check-prefix=COMPILE_1
9+
// RUN: %sourcekitd-test -req=track-compiles == -req=sema %s -- %s | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
10+
// RUN: %sourcekitd-test -req=track-compiles == -req=track-compiles == -req=sema %s -- %s | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
1111
// RUN: %sourcekitd-test -req=track-compiles \
1212
// RUN: == -req=sema %s -- %s \
1313
// RUN: == -req=track-compiles -req-opts=value=0 \
14-
// RUN: == -req=edit %s -replace="//" | %FileCheck %s -check-prefix=COMPILE_1
14+
// RUN: == -req=edit %s -replace="//" | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
1515
// RUN: %sourcekitd-test -req=sema %s -- %s \
1616
// RUN: == -req=track-compiles -req-opts=value=1 \
17-
// RUN: == -req=edit %s -replace="//" | %FileCheck %s -check-prefix=COMPILE_1
17+
// RUN: == -req=edit %s -replace="//" | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
1818
// COMPILE_1: {
1919
// COMPILE_1: key.notification: source.notification.compile-will-start,
2020
// COMPILE_1: key.filepath: "SOURCE_DIR{{.*}}enable-disable.swift",

test/SourceKit/CompileNotifications/type-context-info.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %sourcekitd-test -req=track-compiles == -req=typecontextinfo %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1
1+
// RUN: %sourcekitd-test -req=track-compiles == -req=typecontextinfo %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
22
// COMPILE_1: {
33
// COMPILE_1: key.notification: source.notification.compile-will-start,
4-
// COMPILE_1: key.filepath: "SOURCE_DIR{{.*}}type-context-info.swift",
4+
// COMPILE_1: key.filepath: "{{.*}}SOURCE_DIR{{.*}}type-context-info.swift",
55
// COMPILE_1: key.compileid: [[CID1:".*"]]
66
// COMPILE_1: }
77
// COMPILE_1: {

0 commit comments

Comments
 (0)