From a150751196c69fb78c423ea614c7dbccb5787b9d Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Thu, 9 Jan 2025 09:35:58 +0200 Subject: [PATCH] tests: synchronous: new test * tests/synchronous: Test that --synchronous works. This failed with musl 1.2.5 before the Gnulib commit 0fb185b7cd5e ("fcntl-h: port better to musl on GNU/Linux"). * tests/Makefile.am (TESTS): Add it. --- tests/Makefile.am | 1 + tests/synchronous | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 tests/synchronous diff --git a/tests/Makefile.am b/tests/Makefile.am index 4c10a71..d86cfb0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,6 +29,7 @@ TESTS = \ pipe-output \ reproducible \ stdin \ + synchronous \ timestamp \ two-files \ trailing-nul \ diff --git a/tests/synchronous b/tests/synchronous new file mode 100755 index 0000000..059f38f --- /dev/null +++ b/tests/synchronous @@ -0,0 +1,27 @@ +#!/bin/sh +# Check that --synchronous works. + +# Copyright 2025 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# limit so don't run it by default. + +. "${srcdir=.}/init.sh"; path_prepend_ .. + +printf anything > F || framework_failure_ +gzip --synchronous F || fail=1 +test ! -f F || fail=1 +test -f F.gz || fail=1 + +Exit $fail -- 2.11.4.GIT