From 34064fa2fd1d3da7d398f5314bd4d2de56dca45f Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 29 Jul 2026 23:24:05 +0300 Subject: check for SYNC header length --- tests/sync/source.mk | 5 +++-- tests/sync/too-short-header | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 tests/sync/too-short-header (limited to 'tests') diff --git a/tests/sync/source.mk b/tests/sync/source.mk index 900af7e..a5c6f75 100644 --- a/tests/sync/source.mk +++ b/tests/sync/source.mk @@ -1,2 +1,3 @@ -TESTS += \ - sync/trivial \ +TESTS += \ + sync/trivial \ + sync/too-short-header \ diff --git a/tests/sync/too-short-header b/tests/sync/too-short-header new file mode 100755 index 0000000..e7e844a --- /dev/null +++ b/tests/sync/too-short-header @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +TEST="$0" +OUT="reports/$TEST/stdout" +ERR="reports/$TEST/stderr" + +../server -s - > "$OUT" 2> "$ERR" << EOF +SYNC 18 +START = 10 +END = 20 +EOF + +if [ -s "$OUT" ]; then + echo "Expected no output, but something showed up" + exit 1 +fi -- cgit v1.3