You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
481 B
14 lines
481 B
file(MAKE_DIRECTORY dir)
|
|
file(WRITE dir/in.txt "This is a test")
|
|
execute_process(COMMAND ${PRINT_STDIN_EXE} WORKING_DIRECTORY dir INPUT_FILE in.txt OUTPUT_FILE out.txt ERROR_FILE err.txt)
|
|
if(NOT EXISTS dir/out.txt)
|
|
message(SEND_ERROR "Did not create dir/out.txt")
|
|
endif()
|
|
file(READ dir/out.txt out)
|
|
if(NOT out STREQUAL "This is a test")
|
|
message(SEND_ERROR "Did not read dir/in.txt")
|
|
endif()
|
|
if(NOT EXISTS dir/err.txt)
|
|
message(SEND_ERROR "Did not create dir/err.txt")
|
|
endif()
|