From 50cfce9509c1e43d66ef3a2a85847a8f715f49bd Mon Sep 17 00:00:00 2001 From: Kirill Reshke Date: Tue, 18 Aug 2026 22:50:03 +0500 Subject: [PATCH] Add tests for cat with offset --- test/regress/expected/17_cat_offset.txt | 3 +++ test/regress/tests/17_cat_offset.sh | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 test/regress/expected/17_cat_offset.txt create mode 100755 test/regress/tests/17_cat_offset.sh diff --git a/test/regress/expected/17_cat_offset.txt b/test/regress/expected/17_cat_offset.txt new file mode 100644 index 0000000..e2dc828 --- /dev/null +++ b/test/regress/expected/17_cat_offset.txt @@ -0,0 +1,3 @@ +1 +Object: {Name: "/offset_file", size: 22} +test data here diff --git a/test/regress/tests/17_cat_offset.sh b/test/regress/tests/17_cat_offset.sh new file mode 100755 index 0000000..c06fce9 --- /dev/null +++ b/test/regress/tests/17_cat_offset.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -ex + +echo 'offset test data here' | yp-client --config test/regress/conf/yproxy.yaml -l fatal put 'offset_file' +yp-client --config test/regress/conf/yproxy.yaml -l fatal list '' +# Skip first 7 bytes ("offset "), read the rest +yp-client --config test/regress/conf/yproxy.yaml -l fatal cat --offset 7 'offset_file'