File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -1158,19 +1158,13 @@ extension AllTests.AnalyzerTests {
1158
1158
}
1159
1159
1160
1160
@Test func processingEnvironmentVariable( ) async throws {
1161
- let environment = QueueIsolated < [ String : String ] ? > ( nil )
1162
1161
try await withDependencies {
1163
- $0. fileManager. fileExists = { _ in true }
1164
- $0. shell. run = { @Sendable _, _, env in
1165
- environment. setValue ( env)
1166
- return #"{"name":"foo","products":[],"targets":[]}"#
1167
- }
1162
+ $0. logger = . noop
1163
+ $0. shell = . liveValue
1168
1164
} operation: {
1169
- _ = try await Analyze . dumpPackage ( at: " /somepath " )
1170
- try environment. withValue {
1171
- let keys = try #require( $0? . keys)
1172
- #expect( keys. contains ( " SPI_PROCESSING " ) )
1173
- }
1165
+ @Dependency ( \. shell) var shell
1166
+ let res = try await shell. run ( command: . init( command: " printenv " , arguments: [ " SPI_PROCESSING " ] ) , at: " /tmp " )
1167
+ #expect( res == " 1 " )
1174
1168
}
1175
1169
}
1176
1170
You can’t perform that action at this time.
0 commit comments