Thread (10 messages) 10 messages, 5 authors, 2016-06-15

Re: [PATCH] tests: Introduce test_seq

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:54:25

Possibly related (same subject, not in this thread)

Am 04.08.2012 00:09, schrieb Michał Kiedrowicz:
Junio C Hamano [off-list ref] wrote:
quoted
I do not have strong
opinion on calling this test_seq when it acts differently from seq;
it is not confusing enough to make me push something longer that is
different from "seq", e.g. test_sequence.
I prefer "test_seq" because it reminds seq which helps learning how to
use it.  If some other seq feature is ever needed (e.g. increment value,
decrementing), it may be added at any time (but I don't think so, there
are only few usages after years of test suite existence).
And the reason for this is that we always told people "don't use seq"
and they submitted an updated patch. What would we have to do now? We
have to tell them "don't use seq, use test_seq". Therefore, the patch
does not accomplish anything useful, IMO.

The function should really just be named 'seq'.

Or how about this strategy:

seq () {
	unset -f seq
	if ! seq 1 2 >/dev/null 2>&1
	then
		# don't have a working seq; provide it as a function
		seq () {
			insert your definition here
		}
	fi
	seq "$@"
}

but it is not my favorite.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help