diff options
| author | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-09-26 23:24:03 +0200 |
| commit | 059831534c7e884f0a607ed86b582fd00d821731 (patch) | |
| tree | 76bcb67a78f8aa2654fd34c2ad801a62136b0170 /tests/unit/q65/test_q65code.cmake | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
New upstream version 3.2.0~rc1+dfsgupstream/3.2.0_rc1+dfsg
Diffstat (limited to 'tests/unit/q65/test_q65code.cmake')
| -rw-r--r-- | tests/unit/q65/test_q65code.cmake | 25 |
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 () |
