author | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 11 Jan 2011 21:49:57 +0000 (15:49 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Jan 2011 17:02:23 +0000 (09:02 -0800) | ||
commit | 5094d158741f0f62d69bba8e07dcdb6308528888 | |
tree | f924d2f8f6dc2b260153a67663499a086f225849 | tree | snapshot |
parent | 664d44ee7fb18bdfdd66a1be760c7ee1bbe911c6 | commit | diff |
t4034 (diff --word-diff): style suggestions
Rearrange code to be easier to browse:
- first data
- then functions
- then test assertions
Mark up inline test vectors as
cat >vector <<-\EOF
data
data
EOF
for visual scannability. Use words like "set up" for tests that set
up for other tests, to make it obvious which tests are safe to skip.
Use repeated function calls instead of a loop for the
language-specific tests, so the invocations can be easily tweaked
individually (for example if one starts to fail).
This means if you add a new subdirectory to t4034/, it will not be
automatically used. I think that's worth it for the added
explicitness.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rearrange code to be easier to browse:
- first data
- then functions
- then test assertions
Mark up inline test vectors as
cat >vector <<-\EOF
data
data
EOF
for visual scannability. Use words like "set up" for tests that set
up for other tests, to make it obvious which tests are safe to skip.
Use repeated function calls instead of a loop for the
language-specific tests, so the invocations can be easily tweaked
individually (for example if one starts to fail).
This means if you add a new subdirectory to t4034/, it will not be
automatically used. I think that's worth it for the added
explicitness.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4034-diff-words.sh | diff | blob | history |