Fix PT-P710BT raster protocol handling and add regression coverage.
Align print command payload generation with model-specific protocol requirements, add verbose CLI diagnostics and robust status retries, and introduce protocol regression tests to prevent future GF/ESC i z regressions. Made-with: Cursor
This commit is contained in:
@@ -25,6 +25,7 @@ configure_file(
|
||||
set(LIBPTOUCH_SOURCES
|
||||
src/lib/libptouch_core.c
|
||||
src/lib/libptouch_usb.c
|
||||
src/lib/libptouch_protocol.c
|
||||
src/lib/libptouch_layout.c
|
||||
src/lib/libptouch_media_info.c
|
||||
src/lib/libptouch_trim.c
|
||||
@@ -74,6 +75,19 @@ if(NOT MSVC)
|
||||
target_compile_options(ptouch-print PRIVATE -Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
|
||||
enable_testing()
|
||||
add_executable(ptouch-protocol-regression-test
|
||||
tests/protocol_regression_test.c
|
||||
src/lib/libptouch_protocol.c
|
||||
)
|
||||
target_include_directories(ptouch-protocol-regression-test PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/lib"
|
||||
)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(ptouch-protocol-regression-test PRIVATE -Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
add_test(NAME protocol_regression_test COMMAND ptouch-protocol-regression-test)
|
||||
|
||||
install(TARGETS ptouch ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
install(TARGETS ptouch_shared LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
|
||||
Reference in New Issue
Block a user