{"thread":{"id":"60376","subject":"","startedAt":"2023-10-16T15:58:07Z","lastAt":"2023-10-16T15:58:07Z","messageCount":1,"participants":["Dorcas Litunya"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"483310","messageId":"ZS1dh8RcWD8vzBzM@dorcaslitunya-virtual-machine","threadId":"60376","inReplyTo":null,"subject":"","fromName":"Dorcas Litunya","fromEmail":"anonolitunya@gmail.com","sentAt":"2023-10-16T15:57:59Z","receivedAt":"2023-10-16T15:58:07Z","isPatch":false,"sender":{"key":"anonolitunya@gmail.com","avatar":"https://avatars.githubusercontent.com/u/36160963?v=4"},"body":"Bcc: \nSubject: Re: [PATCH] t/t7601: Modernize test scripts using functions\nReply-To: \nIn-Reply-To: <20231016152113.135970-1-anonolitunya@gmail.com>\n\nOn Mon, Oct 16, 2023 at 06:21:00PM +0300, Dorcas AnonoLitunya wrote:\n> The test script is currently using the command format 'test -f' to\n> check for existence or absence of files.\n> \n> Replace it with new helper functions following the format\n> 'test_path_is_file'.\n> \n> Consequently, the patch also replaces the inverse command '! test -f' or\n> 'test ! -f' with new helper function following the format\n> 'test_path_is_missing'\n> \n> This adjustment using helper functions makes the code more readable and\n> easier to understand.\n> \n> Signed-off-by: Dorcas AnonoLitunya <anonolitunya@gmail.com>\n> ---\n>  t/t7601-merge-pull-config.sh | 24 ++++++++++++------------\n>  1 file changed, 12 insertions(+), 12 deletions(-)\n> \n> diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh\n> index bd238d89b0..e08767df66 100755\n> --- a/t/t7601-merge-pull-config.sh\n> +++ b/t/t7601-merge-pull-config.sh\n> @@ -349,13 +349,13 @@ test_expect_success 'Cannot rebase with multiple heads' '\n>  \n>  test_expect_success 'merge c1 with c2' '\n>  \tgit reset --hard c1 &&\n> -\ttest -f c0.c &&\n> -\ttest -f c1.c &&\n> -\ttest ! -f c2.c &&\n> -\ttest ! -f c3.c &&\n> +\ttest_path_is_file c0.c &&\n> +\ttest_path_is_file c1.c &&\n> +\ttest_path_is_missing c2.c &&\n> +\ttest_path_is_missing c3.c &&\n>  \tgit merge c2 &&\n> -\ttest -f c1.c &&\n> -\ttest -f c2.c\n> +\ttest_path_is_file c1.c &&\n> +\ttest_path_is_file c2.c\n>  '\n>  \n>  test_expect_success 'fast-forward pull succeeds with \"true\" in pull.ff' '\n> @@ -411,8 +411,8 @@ test_expect_success 'merge c1 with c2 (ours in pull.twohead)' '\n>  \tgit reset --hard c1 &&\n>  \tgit config pull.twohead ours &&\n>  \tgit merge c2 &&\n> -\ttest -f c1.c &&\n> -\t! test -f c2.c\n> +\ttest_path_is_file c1.c &&\n> +\ttest_path_is_missing c2.c\n>  '\n>  \n>  test_expect_success 'merge c1 with c2 and c3 (recursive in pull.octopus)' '\n> @@ -431,10 +431,10 @@ test_expect_success 'merge c1 with c2 and c3 (recursive and octopus in pull.octo\n>  \ttest \"$(git rev-parse c2)\" = \"$(git rev-parse HEAD^2)\" &&\n>  \ttest \"$(git rev-parse c3)\" = \"$(git rev-parse HEAD^3)\" &&\n>  \tgit diff --exit-code &&\n> -\ttest -f c0.c &&\n> -\ttest -f c1.c &&\n> -\ttest -f c2.c &&\n> -\ttest -f c3.c\n> +\ttest_path_is_file c0.c &&\n> +\ttest_path_is_file c1.c &&\n> +\ttest_path_is_file c2.c &&\n> +\ttest_path_is_file c3.c\n>  '\n>  \n>  conflict_count()\n> -- \n> 2.42.0.345.gaab89be2eb\n>\n\nPlease ignore this version as I had not indicated Outreachy in the\nsubject header. Thanks.\n"}]}