Thread (1 message) 1 message, 1 author, 2021-06-14

Re: [PATCH 1/4] test-lib-functions: introduce test_line_count_cmd

From: Junio C Hamano <hidden>
Date: 2021-06-14 03:02:01

Ævar Arnfjörð Bjarmason [off-list ref] writes:
More generally speaking we have a bunch of helpers that have this
potential issue/bug, in practice it's not a big deal.  A test that's
being overly specific and doing a test_cmp on unbounded "find" output or
whatever is likely buggy anyway.
Unless we are testing ".gitignore", "ls-files -o", or "git status".
Carving out $TRASH_DIRECTORY/.git/trash/ directory to store these
throwaway files would be less error prone from that point of view.
quoted
+		case "$1" in
+		--out)
+			outop="$2"
+			outval="$3"
+			;;
+		--err)
+			errop="$2"
+			errval="$3"
+			;;
It looks like the end-state of the series leaves us with no user of the
--err option; Maybe it's good to have it anyway for completeness, or
just skip it? ...
I'd rather not to see --out added if we have not yet any use for the
other one.  When the time comes that we want to validate the error
stream, we may find that we want to check _both_, and we'd have to
discard dead code and replace with what we want, instead of just
adding what we want to a working code without dead code.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help