Skip to content

Commit 19ea722

Browse files
committed
Merge branch 'jc/test-yes-doc'
Test doc update. * jc/test-yes-doc: test: caution on our version of 'yes'
2 parents c425d36 + 11f470a commit 19ea722

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

t/README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,15 @@ library for your script to use.
932932
test_oid_init or test_oid_cache. Providing an unknown key is an
933933
error.
934934

935+
- yes [<string>]
936+
937+
This is often seen in modern UNIX but some platforms lack it, so
938+
the test harness overrides the platform implementation with a
939+
more limited one. Use this only when feeding a handful lines of
940+
output to the downstream---unlike the real version, it generates
941+
only up to 99 lines.
942+
943+
935944
Prerequisites
936945
-------------
937946

t/test-lib.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,11 @@ then
13271327
fi
13281328
fi
13291329

1330-
# Provide an implementation of the 'yes' utility
1330+
# Provide an implementation of the 'yes' utility; the upper bound
1331+
# limit is there to help Windows that cannot stop this loop from
1332+
# wasting cycles when the downstream stops reading, so do not be
1333+
# tempted to turn it into an infinite loop. cf. 6129c930 ("test-lib:
1334+
# limit the output of the yes utility", 2016-02-02)
13311335
yes () {
13321336
if test $# = 0
13331337
then

0 commit comments

Comments
 (0)