logo

utils-std

Collection of commonly available Unix tools
commit: 8a0dc3cf2748757aa8a232f14adccdc1bf2aaf76
parent b8680d26cb0c44f4bc0155563dfa99d2d663a85e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 29 May 2024 09:32:31 +0200

test-cmd/head.t: Workaround FreeBSD forbidding getline on /dev/null

Diffstat:

Mtest-cmd/head.t21++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/test-cmd/head.t b/test-cmd/head.t @@ -51,28 +51,35 @@ 0 [1] - $ head -c 3 </dev/null | wc -c + $ printf '' > empty + + $ head -c 3 <empty | wc -c 0 - $ head -c 3 /dev/null | wc -c + $ head -c 3 empty | wc -c 0 - $ head -n 3 </dev/null | wc -l + $ head -n 3 <empty | wc -l 0 - $ head -n 3 /dev/null | wc -l + $ head -n 3 empty | wc -l 0 - $ seq 1 2 | head - /dev/null + $ seq 1 2 | head - empty ==> - <== 1 2 - ==> /dev/null <== + ==> empty <== $ seq 1 2 | head -v - ==> - <== 1 2 - $ seq 1 2 | head -q - /dev/null + $ seq 1 2 | head -q - empty 1 2 + + $ rm empty + + $ find . + .