* [PATCH v1 1/2] t/README: remove mention of adding copyright notices
@ 2017-11-26 20:20 Thomas Gummerer
2017-11-26 20:21 ` [PATCH v1 2/2] t/README: document test_cmp_rev Thomas Gummerer
2017-12-05 19:49 ` [PATCH v1 1/2] t/README: remove mention of adding copyright notices Jonathan Nieder
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Gummerer @ 2017-11-26 20:20 UTC (permalink / raw)
To: git; +Cc: Thomas Gummerer
We generally no longer include copyright notices in new test scripts.
However t/README still mentions it as something to include at the top of
every new script.
Remove that mention as it's outdated.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
I read through some parts of t/README, while working on the tests for
the worktree dwim patches, and noticed some things that are outdated/a
useful function that's not documented anywhere. Here's a couple of
patches to fix that.
t/README | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/t/README b/t/README
index 4b079e4494..448569b60e 100644
--- a/t/README
+++ b/t/README
@@ -332,13 +332,10 @@ Writing Tests
-------------
The test script is written as a shell script. It should start
-with the standard "#!/bin/sh" with copyright notices, and an
+with the standard "#!/bin/sh", and an
assignment to variable 'test_description', like this:
#!/bin/sh
- #
- # Copyright (c) 2005 Junio C Hamano
- #
test_description='xxx test (option --frotz)
--
2.15.0.426.gb06021eeb
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] t/README: document test_cmp_rev
2017-11-26 20:20 [PATCH v1 1/2] t/README: remove mention of adding copyright notices Thomas Gummerer
@ 2017-11-26 20:21 ` Thomas Gummerer
2017-12-05 19:46 ` Jonathan Nieder
2017-12-05 19:49 ` [PATCH v1 1/2] t/README: remove mention of adding copyright notices Jonathan Nieder
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Gummerer @ 2017-11-26 20:21 UTC (permalink / raw)
To: git; +Cc: Thomas Gummerer
test_cmp_rev is a useful function that's used in quite a few test
scripts. It is however not documented in t/README. Document it.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
t/README | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/t/README b/t/README
index 448569b60e..e867d1f8bd 100644
--- a/t/README
+++ b/t/README
@@ -674,6 +674,11 @@ library for your script to use.
<expected> file. This behaves like "cmp" but produces more
helpful output when the test is run with "-v" option.
+ - test_cmp_rev <expected> <actual>
+
+ Check whether the <expected> rev points to the same commit as the
+ <actual> rev.
+
- test_line_count (= | -lt | -ge | ...) <length> <file>
Check whether a file has the length it is expected to.
--
2.15.0.426.gb06021eeb
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] t/README: document test_cmp_rev
2017-11-26 20:21 ` [PATCH v1 2/2] t/README: document test_cmp_rev Thomas Gummerer
@ 2017-12-05 19:46 ` Jonathan Nieder
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Nieder @ 2017-12-05 19:46 UTC (permalink / raw)
To: Thomas Gummerer; +Cc: git
Hi,
Thomas Gummerer wrote:
> test_cmp_rev is a useful function that's used in quite a few test
> scripts. It is however not documented in t/README. Document it.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> ---
> t/README | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
I admit I usually go straight to t/test-lib-functions.sh when I want
to find an appropriate helper. I think this kind of introductory
documentation in t/README is still useful, though.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] t/README: remove mention of adding copyright notices
2017-11-26 20:20 [PATCH v1 1/2] t/README: remove mention of adding copyright notices Thomas Gummerer
2017-11-26 20:21 ` [PATCH v1 2/2] t/README: document test_cmp_rev Thomas Gummerer
@ 2017-12-05 19:49 ` Jonathan Nieder
2017-12-08 20:47 ` Thomas Gummerer
1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Nieder @ 2017-12-05 19:49 UTC (permalink / raw)
To: Thomas Gummerer; +Cc: git, Junio C Hamano
Hi,
Thomas Gummerer wrote:
> We generally no longer include copyright notices in new test scripts.
> However t/README still mentions it as something to include at the top of
> every new script.
Where can I read more about this change? Was it a deliberate change
or something that simply happened?
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] t/README: remove mention of adding copyright notices
2017-12-05 19:49 ` [PATCH v1 1/2] t/README: remove mention of adding copyright notices Jonathan Nieder
@ 2017-12-08 20:47 ` Thomas Gummerer
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gummerer @ 2017-12-08 20:47 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Junio C Hamano
On 12/05, Jonathan Nieder wrote:
> Hi,
>
> Thomas Gummerer wrote:
>
> > We generally no longer include copyright notices in new test scripts.
> > However t/README still mentions it as something to include at the top of
> > every new script.
>
> Where can I read more about this change? Was it a deliberate change
> or something that simply happened?
I'm not sure if it was a deliberate change, I just noticed that most
new test files don't have a copyright notice anymore.
$ git grep "Copyright (c)" t/* | sed -E 's/.*?Copyright .c. ([[:digit:]]+).*?/\1/' | sort | uniq -c
61 2005
40 2006
55 2007
32 2008
31 2009
30 2010
10 2011
14 2012
4 2013
3 2014
1 2015
5 2016
While we may be adding less new test files, we definitely added a few
in 2017, for example t/t7521-ignored-mode.sh in 371c80c746 ("status:
test ignored modes", 2017-10-30), or t/t0025-crlf-renormalize.sh in
9472935d81 ("add: introduce "--renormalize"", 2017-11-16).
> Thanks,
> Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-08 20:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-26 20:20 [PATCH v1 1/2] t/README: remove mention of adding copyright notices Thomas Gummerer
2017-11-26 20:21 ` [PATCH v1 2/2] t/README: document test_cmp_rev Thomas Gummerer
2017-12-05 19:46 ` Jonathan Nieder
2017-12-05 19:49 ` [PATCH v1 1/2] t/README: remove mention of adding copyright notices Jonathan Nieder
2017-12-08 20:47 ` Thomas Gummerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).