git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GSOC][RFC PATCH 0/1] microproject: use test_path_is_* functions in test scripts
@ 2024-02-19 17:22 Vincenzo Mezzela
  2024-02-19 17:22 ` [GSOC][RFC PATCH 1/1] t: t7301-clean-interactive: Use test_path_is_(missing|file) Vincenzo Mezzela
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Vincenzo Mezzela @ 2024-02-19 17:22 UTC (permalink / raw)
  To: git; +Cc: Vincenzo Mezzela

This patch is submitted as a microproject for the application to the GSOC.
Upon previous dicussion[1], this patch replace the test shell commands
with the helper functions as follows:

- 'test -f'   --> 'test_path_is_file'
- 'test ! -f' --> 'test_path_is_missing'

In the context of this file, 'test ! -f' is meant to check if the file
has been correctly cleaned, thus its usage has been replaced with
'test_path_is_missing' instead of '! test_path_is_file'.

Submitting as RFC to ask whether there is room for further improvements:

Would you like to see something like 

'''
test_path_is_missing file1 &&
test_path_is_file file2 &&
test_path_is_missing file3 &&
test_path_is_file file5
'''

changed into 

'''
test_path_is_file file2 &&
test_path_is_file file5 &&
test_path_is_missing file3 &&
test_path_is_missing file1 
'''

where all the test_path_is_file are grouped before and followed by all
the test_path_is_missing (or the other way around) to enhance
readability of the code?

Thanks,
Vincenzo

[1] https://lore.kernel.org/git/xmqqy1bo5k5h.fsf@gitster.g/

Vincenzo Mezzela (1):
  t: t7301-clean-interactive: Use test_path_is_(missing|file)

 t/t7301-clean-interactive.sh | 490 +++++++++++++++++------------------
 1 file changed, 245 insertions(+), 245 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-03-11 16:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-19 17:22 [GSOC][RFC PATCH 0/1] microproject: use test_path_is_* functions in test scripts Vincenzo Mezzela
2024-02-19 17:22 ` [GSOC][RFC PATCH 1/1] t: t7301-clean-interactive: Use test_path_is_(missing|file) Vincenzo Mezzela
2024-02-26 10:13   ` Christian Couder
2024-02-19 19:36 ` [GSOC][RFC PATCH 0/1] microproject: use test_path_is_* functions in test scripts Eric Sunshine
2024-02-27 16:17 ` [GSOC][PATCH v2 " Vincenzo Mezzela
2024-02-27 16:17   ` [GSOC][PATCH v2 1/1] t7301: use test_path_is_(missing|file) Vincenzo Mezzela
2024-03-04  9:31     ` Patrick Steinhardt
2024-03-04 17:17   ` [GSOC][PATCH v3 0/1] microproject: use test_path_is_* functions in test scripts Vincenzo Mezzela
2024-03-04 17:17     ` [GSOC][PATCH v3 1/1] t7301: use test_path_is_(missing|file) Vincenzo Mezzela
2024-03-04 21:50       ` Junio C Hamano
2024-03-04 23:53         ` Eric Sunshine
2024-03-10 11:43     ` [GSOC][PATCH v4 0/1] microproject: use test_path_is_* functions in test scripts Vincenzo Mezzela
2024-03-10 11:43       ` [GSOC][PATCH v4 1/1] t7301: use test_path_is_(missing|file) Vincenzo Mezzela
2024-03-11 16:32         ` Junio C Hamano

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).