Centralize legacy brush package export

This commit is contained in:
2026-06-04 14:44:37 +02:00
parent 2bd1b12ade
commit 78185b8fd5
13 changed files with 511 additions and 20 deletions

View File

@@ -288,6 +288,16 @@ add_test(NAME pp_app_core_brush_ui_tests COMMAND pp_app_core_brush_ui_tests)
set_tests_properties(pp_app_core_brush_ui_tests PROPERTIES
LABELS "app;paint;desktop-fast;fuzz")
add_executable(pp_app_core_brush_package_export_tests
app_core/brush_package_export_tests.cpp)
target_link_libraries(pp_app_core_brush_package_export_tests PRIVATE
pp_app_core
pp_test_harness)
add_test(NAME pp_app_core_brush_package_export_tests COMMAND pp_app_core_brush_package_export_tests)
set_tests_properties(pp_app_core_brush_package_export_tests PROPERTIES
LABELS "app;paint;assets;desktop-fast;fuzz")
add_executable(pp_app_core_canvas_tool_ui_tests
app_core/canvas_tool_ui_tests.cpp)
target_link_libraries(pp_app_core_canvas_tool_ui_tests PRIVATE
@@ -877,6 +887,37 @@ if(TARGET pano_cli)
WILL_FAIL TRUE
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-startup\".*\"message\":\"run counter must not be negative\"")
add_test(NAME pano_cli_plan_brush_package_export_smoke
COMMAND pano_cli plan-brush-package-export
--path D:/Paint/clouds.ppbr
--author Artist
--email artist@example.test
--url https://example.test/brushes
--description "Cloud brush set"
--dest-path D:/Paint/BrushPreviews
--export-data
--header-image)
set_tests_properties(pano_cli_plan_brush_package_export_smoke PROPERTIES
LABELS "app;paint;assets;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-brush-package-export\".*\"path\":\"D:/Paint/clouds.ppbr\".*\"author\":\"Artist\".*\"destPath\":\"D:/Paint/BrushPreviews\".*\"exportData\":true.*\"hasHeaderImage\":true.*\"dispatches\":1")
add_test(NAME pano_cli_plan_brush_package_export_rejects_empty_path
COMMAND "${CMAKE_COMMAND}"
-DPANO_CLI=$<TARGET_FILE:pano_cli>
"-DEXPECTED_OUTPUT=brush package export path must not be empty"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/expect_pano_cli_plan_brush_package_export_failure.cmake")
set_tests_properties(pano_cli_plan_brush_package_export_rejects_empty_path PROPERTIES
LABELS "app;paint;assets;integration;desktop-fast;fuzz")
add_test(NAME pano_cli_plan_brush_package_export_dest_without_data_smoke
COMMAND pano_cli plan-brush-package-export
--path D:/Paint/clouds.ppbr
--dest-path D:/Paint/BrushPreviews
--no-export-data)
set_tests_properties(pano_cli_plan_brush_package_export_dest_without_data_smoke PROPERTIES
LABELS "app;paint;assets;integration;desktop-fast;fuzz"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-brush-package-export\".*\"destPath\":\"D:/Paint/BrushPreviews\".*\"exportData\":false.*\"dispatches\":1")
add_test(NAME pano_cli_plan_tools_menu_shortcuts_smoke
COMMAND pano_cli plan-tools-menu --command shortcuts)
set_tests_properties(pano_cli_plan_tools_menu_shortcuts_smoke PROPERTIES