]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
head: new test for big count
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 11 Aug 2024 02:28:37 +0000 (19:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 11 Aug 2024 02:30:01 +0000 (19:30 -0700)
* tests/head/head-c.sh: Also test head -c with a number
much bigger than UINTMAX_MAX.

tests/head/head-c.sh

index 664e3d56b0830e24da169e4871c2d93d1ce9f122..f7cef03b0a72b806131a2e19f84ed11452a3a3b6 100755 (executable)
@@ -41,6 +41,8 @@ esac
 # based on the value passed to -c
 vm=$(get_min_ulimit_v_ head -c1 /dev/null) && {
   (ulimit -v $(($vm+8000)) && head --bytes=-$SSIZE_MAX < /dev/null) || fail=1
+  (ulimit -v $(($vm+8000)) &&
+    head --bytes=-${UINTMAX_OFLOW}000 < /dev/null) || fail=1
 }
 
 # Make sure it works on funny files in /proc and /sys.