[GSOC][RFC PATCH 0/1] microproject: use test_path_is_* functions in test scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux