Thread View: linux.kernel.git
3 messages
3 total messages
Started by Victor Okafor
Wed, 14 Oct 2026 10:56
[PATCH] t0200: use path checking helpers
Author: Victor Okafor
Date: Wed, 14 Oct 2026 10:56
Date: Wed, 14 Oct 2026 10:56
33 lines
8548 bytes
8548 bytes
Replace direct directory and file checks with the corresponding
test helpers in t/t0200-gettext-basic.sh.
Instances were located using:
git grep -n -E 'test -[efds]' -- 't/t[0-9]*.sh'
Signed-off-by: Victor Okafor <vua.okafor@gmail.com>
---
t/t0200-gettext-basic.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh
index 8db26c1ada..177cf658fd 100755
--- a/t/t0200-gettext-basic.sh
+++ b/t/t0200-gettext-basic.sh
@@ -31,12 +31,12 @@ test_expect_success 'xgettext sanity: Comment extraction with --add-comments sto
'
test_expect_success GETTEXT 'sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease' '
- test -d "$TEXTDOMAINDIR" &&
+ test_path_is_dir "$TEXTDOMAINDIR" &&
test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
'
test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '
- test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
+ test_path_is_file "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
'
# TODO: When we have more locales, generalize this to test them
--
2.55.0
Re: [PATCH] t0200: use path checking helpers
Author: Usman Akinyemi
Date: Wed, 14 Oct 2026 14:45
Date: Wed, 14 Oct 2026 14:45
34 lines
9786 bytes
9786 bytes
> > Replace direct directory and file checks with the corresponding > test helpers in t/t0200-gettext-basic.sh. This is a little bit more confusing. The commit message does not really show why you did what you did. Along the line of "Modernize the code testing whether a file exists in "filename"' seems better. Also, your patches is doing two things, i.e modernizing the 'test -f' and 'test -d'. Ideally a patch should only focus on one thing but, since this is simple patch. It is okay. > > Instances were located using: > git grep -n -E 'test -[efds]' -- 't/t[0-9]*.sh' This part is nto necessary. > > Signed-off-by: Victor Okafor <vua.okafor@gmail.com> > --- > t/t0200-gettext-basic.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh > test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' ' > - test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo" > + test_path_is_file "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo" > ' > > # TODO: When we have more locales, generalize this to test them > -- > 2.55.0 > Thanks >
Re: [PATCH] t0200: use path checking helpers
Author: Junio C Hamano
Date: Wed, 14 Oct 2026 19:24
Date: Wed, 14 Oct 2026 19:24
42 lines
11041 bytes
11041 bytes
Usman Akinyemi <usmanakinyemi202@gmail.com> writes: >> >> Replace direct directory and file checks with the corresponding >> test helpers in t/t0200-gettext-basic.sh. > This is a little bit more confusing. The commit message does not > really show why you did what you did. Along the line of > > "Modernize the code testing whether a file exists in "filename"' seems > better. Also, your patches is doing two things, i.e modernizing the 'test -f' > and 'test -d'. Ideally a patch should only focus on one thing but, > since this is > simple patch. It is okay. >> >> Instances were located using: >> git grep -n -E 'test -[efds]' -- 't/t[0-9]*.sh' > This part is nto necessary. Since many candidates are working on similar microprojects (which is fine) and making the same mistakes (which is expected), perhaps mentors should tell them to read the review exchanges on other candidates' patches and learn from them. >> >> Signed-off-by: Victor Okafor <vua.okafor@gmail.com> >> --- >> t/t0200-gettext-basic.sh | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh >> test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' ' >> - test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo" >> + test_path_is_file "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo" >> ' >> >> # TODO: When we have more locales, generalize this to test them >> -- >> 2.55.0 >> > Thanks >>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads