@@ -988,12 +988,11 @@ struct PipeConfigurationTests {
988
988
#expect( lineCount == " 1 " )
989
989
#expect( result. terminationStatus. isSuccess)
990
990
}
991
+ #endif
991
992
992
993
@Test func testProcessHelperWithErrorRedirection( ) async throws {
993
994
let pipeline =
994
- pipe (
995
- Echo ( " data " )
996
- )
995
+ pipe ( Echo ( " data " ) )
997
996
| Cat( ) // Simple passthrough, no error redirection needed
998
997
| Wc( " -c " )
999
998
|> . string( limit: . max)
@@ -1010,11 +1009,9 @@ struct PipeConfigurationTests {
1010
1009
@Test func testPipelineErrorHandling( ) async throws {
1011
1010
// Create a pipeline where one command will fail
1012
1011
let pipeline =
1013
- pipe (
1014
- executable: . name( " echo " ) ,
1015
- arguments: [ " test " ]
1016
- ) | . name( " nonexistent-command " ) // This should fail
1017
- | . name ( " cat " ) |> . string( limit: . max)
1012
+ pipe ( Echo ( " test " ) )
1013
+ | . name ( " nonexistent-command " ) // This should fail
1014
+ | Cat( ) |> . string( limit: . max)
1018
1015
1019
1016
await #expect( throws: ( any Error ) . self) {
1020
1017
_ = try await pipeline. run ( )
@@ -1025,8 +1022,7 @@ struct PipeConfigurationTests {
1025
1022
1026
1023
@Test func testPipeConfigurationDescription( ) {
1027
1024
let config = pipe (
1028
- executable: . name( " echo " ) ,
1029
- arguments: [ " test " ]
1025
+ Echo ( " test " )
1030
1026
) . finally (
1031
1027
output: . string( limit: . max)
1032
1028
)
@@ -1038,12 +1034,9 @@ struct PipeConfigurationTests {
1038
1034
1039
1035
@Test func testPipelineDescription( ) {
1040
1036
let pipeline =
1041
- pipe (
1042
- executable: . name( " echo " ) ,
1043
- arguments: [ " test " ]
1044
- )
1045
- | . name ( " cat " )
1046
- | . name ( " wc " )
1037
+ pipe ( Echo ( " test " ) )
1038
+ | Cat( )
1039
+ | Wc( )
1047
1040
|> . string( limit: . max)
1048
1041
1049
1042
let description = pipeline. description
@@ -1061,7 +1054,6 @@ struct PipeConfigurationTests {
1061
1054
#expect( result. standardOutput? . trimmingCharacters ( in: CharacterSet . whitespacesAndNewlines) == " helper test " )
1062
1055
#expect( result. terminationStatus. isSuccess)
1063
1056
}
1064
- #endif
1065
1057
1066
1058
@Test func testProcessHelper( ) async throws {
1067
1059
let pipeline =
0 commit comments