Debian Codegraph @

Tests/RunCMake/execute_process/InOutErrDirectory.cmake

raw
1 file(MAKE_DIRECTORY dir)
2 file(WRITE dir/in.txt "This is a test")
3 execute_process(COMMAND ${PRINT_STDIN_EXE} WORKING_DIRECTORY dir INPUT_FILE in.txt OUTPUT_FILE out.txt ERROR_FILE err.txt)
4 if(NOT EXISTS dir/out.txt)
5 message(SEND_ERROR "Did not create dir/out.txt")
6 endif()
7 file(READ dir/out.txt out)
8 if(NOT out STREQUAL "This is a test")
9 message(SEND_ERROR "Did not read dir/in.txt")
10 endif()
11 if(NOT EXISTS dir/err.txt)
12 message(SEND_ERROR "Did not create dir/err.txt")
13 endif()