summaryrefslogtreecommitdiff
path: root/tests/unit/q65/test_q65code.cmake
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
committerChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
commit69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch)
treeebc98370a697a9bbd6b973a14fa5113c475c6db7 /tests/unit/q65/test_q65code.cmake
parent3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff)
parent059831534c7e884f0a607ed86b582fd00d821731 (diff)
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg' with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'tests/unit/q65/test_q65code.cmake')
-rw-r--r--tests/unit/q65/test_q65code.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/unit/q65/test_q65code.cmake b/tests/unit/q65/test_q65code.cmake
new file mode 100644
index 00000000..cfbb9939
--- /dev/null
+++ b/tests/unit/q65/test_q65code.cmake
@@ -0,0 +1,25 @@
+execute_process(
+ COMMAND "${Q65CODE}" "THIS FREE TEXT IS TOO LONG"
+ RESULT_VARIABLE fallback_result
+ OUTPUT_VARIABLE fallback_output
+ ERROR_VARIABLE fallback_error
+)
+if (NOT fallback_result EQUAL 0)
+ message(FATAL_ERROR "Legacy fallback failed (${fallback_result}):\n${fallback_output}${fallback_error}")
+endif ()
+if (NOT fallback_output MATCHES "Message sent:[ ]+THIS FREE TEX")
+ message(FATAL_ERROR "Fallback output was unexpected:\n${fallback_output}")
+endif ()
+
+execute_process(
+ COMMAND "${Q65CODE}" "HELLO@WORLD"
+ RESULT_VARIABLE rejected_result
+ OUTPUT_VARIABLE rejected_output
+ ERROR_VARIABLE rejected_error
+)
+if (rejected_result EQUAL 0)
+ message(FATAL_ERROR "Unrepresentable message returned success:\n${rejected_output}")
+endif ()
+if (NOT rejected_output MATCHES "Cannot encode message:[ ]+HELLO@WORLD")
+ message(FATAL_ERROR "Rejected message output was unexpected:\n${rejected_output}${rejected_error}")
+endif ()