mbox series

[GSoC,v3,0/3] Use helper functions in test script

Message ID 20190304120801.28763-1-rohit.ashiwal265@gmail.com (mailing list archive)
Headers show
Series Use helper functions in test script | expand

Message

Rohit Ashiwal March 4, 2019, 12:07 p.m. UTC
This patch ultimately aims to replace `test -(d|f|e|s)` calls in t3600-rm.sh
Previously we were using these to verify the presence of diretory/file, but
we already have helper functions, viz, `test_path_is_dir`, `test_path_is_file`,
`test_path_is_missing` and `test_file_not_empty` with better functionality

Helper functions are better as they provide better error messages and
improve readability. They are friendly to someone new to code.

Rohit Ashiwal (3):
  test functions: add function `test_file_not_empty`
  t3600: modernize style
  t3600: use helpers to replace test -d/f/e/s <path>

 t/t3600-rm.sh           | 349 ++++++++++++++++++++--------------------
 t/test-lib-functions.sh |   9 ++
 2 files changed, 187 insertions(+), 171 deletions(-)

Comments

Eric Sunshine March 5, 2019, 12:09 a.m. UTC | #1
On Mon, Mar 4, 2019 at 7:08 AM Rohit Ashiwal <rohit.ashiwal265@gmail.com> wrote:
> This patch ultimately aims to replace `test -(d|f|e|s)` calls in t3600-rm.sh
> Previously we were using these to verify the presence of diretory/file, but
> we already have helper functions, viz, `test_path_is_dir`, `test_path_is_file`,
> `test_path_is_missing` and `test_file_not_empty` with better functionality
>
> Helper functions are better as they provide better error messages and
> improve readability. They are friendly to someone new to code.

As an aid to reviewers, please use the cover-letter to explain what
changed since the previous version of the patch series. Also, to
further help reviewers, consider using the --range-diff or --interdiff
options with "git format-patch" to visually show the changes since the
previous attempt (in addition to your prose explanation).

Finally, it is a good idea to provide a link, like this[1], to the
previous round in order to jog the memory of existing reviewers and to
provide context for people new to the review of the series.

[1]: https://public-inbox.org/git/20190303233750.6500-1-rohit.ashiwal265@gmail.com/