Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Tests/SubprocessTests/StressTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2024 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//

import Testing
import Subprocess

@Suite
struct SubprocessTests {
@Test
func manySubprocesses() async throws {
for _ in 0..<1000 {
let output = try await run(
.path(.init("/bin/echo")),
arguments: ["Hello, world!"],
)
#expect(output.standardOutput == "Hello, world!\n")
}
}
}