File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -718,28 +718,26 @@ test_cmp_rev () {
718718 test_cmp expect.rev actual.rev
719719}
720720
721- # Print a sequence of numbers or letters in increasing order. This is
722- # similar to GNU seq(1), but the latter might not be available
723- # everywhere (and does not do letters). It may be used like:
724- #
725- # for i in $(test_seq 100)
726- # do
727- # for j in $(test_seq 10 20)
728- # do
729- # for k in $(test_seq a z)
730- # do
731- # echo $i-$j-$k
732- # done
733- # done
734- # done
721+ # Print a sequence of integers in increasing order, either with
722+ # two arguments (start and end):
723+ #
724+ # test_seq 1 5 -- outputs 1 2 3 4 5 one line at a time
725+ #
726+ # or with one argument (end), in which case it starts counting
727+ # from 1.
735728
736729test_seq () {
737730 case $# in
738731 1) set 1 " $@ " ;;
739732 2) ;;
740733 * ) error " bug in the test script: not 1 or 2 parameters to test_seq" ;;
741734 esac
742- perl -le ' print for $ARGV[0]..$ARGV[1]' -- " $@ "
735+ test_seq_counter__=$1
736+ while test " $test_seq_counter__ " -le " $2 "
737+ do
738+ echo " $test_seq_counter__ "
739+ test_seq_counter__=$(( $test_seq_counter__ + 1 ))
740+ done
743741}
744742
745743# This function can be used to schedule some commands to be run
You can’t perform that action at this time.
0 commit comments