| 628 | } |
| 629 | |
| 630 | bool testUVProcessChainInputFile(char const* helperCommand) |
| 631 | { |
| 632 | std::unique_ptr<FILE, int (*)(FILE*)> f( |
| 633 | fopen("testUVProcessChainInput.txt", "rb"), fclose); |
| 634 | |
| 635 | cmUVProcessChainBuilder builder; |
| 636 | builder.AddCommand({ helperCommand, "dedup" }) |
| 637 | .SetExternalStream(cmUVProcessChainBuilder::Stream_INPUT, f.get()) |
| 638 | .SetBuiltinStream(cmUVProcessChainBuilder::Stream_OUTPUT); |
| 639 | |
| 640 | auto chain = builder.Start(); |
| 641 | |
| 642 | if (!chain.Wait()) { |
| 643 | std::cout << "Wait() timed out" << std::endl; |
| 644 | return false; |
| 645 | } |
| 646 | |
| 647 | cmUVIStream stream(chain.OutputStream()); |
| 648 | std::string output = getInput(stream); |
| 649 | if (output != "HELO WRD!") { |
| 650 | std::cout << "Output was \"" << output << "\", expected \"HELO WRD!\"" |
| 651 | << std::endl; |
| 652 | return false; |
| 653 | } |
| 654 | |
| 655 | return true; |
| 656 | } |
| 657 | |
| 658 | bool testUVProcessChainWait0(char const* helperCommand) |
| 659 | { |
no test coverage detected
searching dependent graphs…