Files
swift-mirror/test/diagnostics/extra-newlines.swift
Steven Wu 12f8d9c6c9 [TEST] Switch to use new swift-driver when running tests
Default to use new swift-driver to run lit tests as legacy swift driver
is deprecated for a long time. The lit tests for legacy drivers are also
disable when running new swift-driver.

Tests that relies on legacy swift driver (for example, tests merge
module) can be enabled on conditions `legacy_swift_driver`. Fix and
split up some existing tests that relies on legacy driver.
2026-03-23 09:48:45 -07:00

23 lines
912 B
Swift

// Check that there are no extra newlines in the driver diagnostics output due to
// double LF -> CR LF conversions on child processes output on Windows.
//
// Compile more than one source files to trigger the use of the driver
// task queue and child processes.
// RUN: %line-directive %s %S/Inputs/extra-newlines-2.swift -- %swiftc_driver -c -diagnostic-style=swift -no-color-diagnostics %s %S/Inputs/extra-newlines-2.swift -module-name Foo 2>&1 | %FileCheck %s
// REQUIRES: swift_swift_parser
// Check that there are no extra newlines between diagnostics lines
// CHECK: SOURCE_DIR{{[/|\\]+}}test{{[/|\\]+}}diagnostics{{[/|\\]+}}extra-newlines.swift:[[#LINE:]]:5
// CHECK: [[#LINE-2]] |
// CHECK: [[#LINE-1]] | func foo(a: Int, b: Int) {
// CHECK: [[#LINE]] | a + b
// CHECK: | `- warning: result of operator '+' is unused
// CHECK: [[#LINE+1]] | }
func foo(a: Int, b: Int) {
a + b
}