From fb81c39b3849b42e4bba9ff62d05d8dacd8ef933 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 29 Oct 2026 21:30:39 +0100 Subject: [PATCH] tests: split: ensure split accepts a leading '+' in the number of chunks Reported at https://github.com/uutils/coreutils/issues/16006 * tests/split/b-chunk.sh: Add test case. Link: https://github.com/coreutils/coreutils/pull/434 --- tests/split/b-chunk.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/split/b-chunk.sh b/tests/split/b-chunk.sh index 5ee12a6e3..e2ba2148b 100755 --- a/tests/split/b-chunk.sh +++ b/tests/split/b-chunk.sh @@ -88,4 +88,11 @@ for file in input /proc/version /sys/kernel/profiling; do done done +# A leading '+' is accepted in the number of chunks. +rm -f x?? || framework_failure_ +printf 'a\nb\n' > in || framework_failure_ +split -n +2 in || fail=1 +test -f xaa && test -f xab || fail=1 +test -f xac && fail=1 + Exit $fail