Plan new document creation in app core

This commit is contained in:
2026-06-02 23:14:35 +02:00
parent fd1772a417
commit 853307697a
10 changed files with 284 additions and 21 deletions

View File

@@ -0,0 +1,26 @@
if(NOT DEFINED PANO_CLI)
message(FATAL_ERROR "PANO_CLI is required")
endif()
if(NOT DEFINED EXPECTED_OUTPUT)
message(FATAL_ERROR "EXPECTED_OUTPUT is required")
endif()
execute_process(
COMMAND "${PANO_CLI}" plan-new-document
--work-dir D:/Paint
--name demo
--resolution-index 99
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error)
if(result EQUAL 0)
message(FATAL_ERROR "pano_cli plan-new-document unexpectedly succeeded: ${output}${error}")
endif()
string(FIND "${output}${error}" "${EXPECTED_OUTPUT}" found_at)
if(found_at EQUAL -1)
message(FATAL_ERROR
"pano_cli plan-new-document failure output did not contain expected text.\nExpected: ${EXPECTED_OUTPUT}\nOutput: ${output}${error}")
endif()