| 177 | } |
| 178 | |
| 179 | void SC::ProcessTest::processChainInheritSingle() |
| 180 | { |
| 181 | //! [processChainInheritSingleSnippet] |
| 182 | // Creates a process chain with a single process |
| 183 | Process p1; |
| 184 | ProcessChain chain; |
| 185 | switch (HostPlatform) |
| 186 | { |
| 187 | case Platform::Windows: { |
| 188 | SC_TEST_EXPECT(chain.pipe(p1, {"where", "where.exe"})); |
| 189 | } |
| 190 | break; |
| 191 | default: { // Posix |
| 192 | SC_TEST_EXPECT(chain.pipe(p1, {"echo", "DOCTORI"})); |
| 193 | } |
| 194 | break; |
| 195 | } |
| 196 | SC_TEST_EXPECT(chain.exec()); |
| 197 | //! [processChainInheritSingleSnippet] |
| 198 | } |
| 199 | |
| 200 | void SC::ProcessTest::processChainInheritDual() |
| 201 | { |