Thread (16 messages) flat view 16 messages, 3 authors, 2016-06-15

Re: [RFC/PATCH 02/10] test-lib: introduce test_line_count to measure files

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:00

Jonathan Nieder [off-list ref] writes:
Introduce a test_line_count function to help. If used like

	git ls-files -u B >output &&
	test_line_count -eq 3 output

it will produce output like

	test_line_count: line count for output !-eq 3
	100644 b023018cabc396e7692c70bbf5784a93d3f738ab 2	hi.c
	100644 45b983be36b73c0788dc9cbcb76cbb80fc7bb057 3	hi.c

on failure.
Sounds like a sane thing to do.

Especially because you wrote the implementation without surrounding dq
pair, the callers can say "test_line_count = $N $file" instead of -eq and
things will not break.  Nice.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help