Bugzilla – Attachment 181559 Details for
Bug 39741
xt/author/valid-templates.t should setting dirs to skip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39741: Make valid-templates.t handle dirs
Bug-39741-Make-valid-templatest-handle-dirs.patch (text/plain), 3.15 KB, created by
David Nind
on 2025-04-25 22:12:47 UTC
(
hide
)
Description:
Bug 39741: Make valid-templates.t handle dirs
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-04-25 22:12:47 UTC
Size:
3.15 KB
patch
obsolete
>From 4cff090b397522d91a4e3c3fe64746743338baab Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 24 Apr 2025 11:45:43 -0300 >Subject: [PATCH] Bug 39741: Make valid-templates.t handle dirs > >This patch changes the regex so it doesn't expect the exclusion >parameters to only be files but accept directories too. > >The risk of this is we might at some point catch more than we want. > >I don't think it is worth spending more time in it, though. > >To test: >1. Run: > $ ktd --shell > k$ prove xt/author/valid-templates.t >=> SUCCESS: Tests pass! >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests pass! We don't need to list each individual file >anymore and it will still work! >4. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >--- > xt/author/valid-templates.t | 24 +++++------------------- > 1 file changed, 5 insertions(+), 19 deletions(-) > >diff --git a/xt/author/valid-templates.t b/xt/author/valid-templates.t >index fbbf03c2c4..a8cc379b70 100755 >--- a/xt/author/valid-templates.t >+++ b/xt/author/valid-templates.t >@@ -84,34 +84,20 @@ foreach my $theme (@themes) { > $theme->{'modules'}, > $theme->{'includes'}, > >- # templates to exclude from testing because >+ # templates or dirs to exclude from testing because > # they cannot stand alone > 'doc-head-close.inc', > 'opac-bottom.inc', >- 'ill/backends/Standard/shared/forms/article.inc', >- 'ill/backends/Standard/shared/forms/book.inc', >- 'ill/backends/Standard/shared/forms/chapter.inc', >- 'ill/backends/Standard/shared/forms/conference.inc', >- 'ill/backends/Standard/shared/forms/dvd.inc', >- 'ill/backends/Standard/shared/forms/journal.inc', >- 'ill/backends/Standard/shared/forms/resource.inc', >- 'ill/backends/Standard/shared/forms/thesis.inc', >+ 'ill/backends/Standard/shared/forms', > ); > } else { > run_template_test( > $theme->{'modules'}, > $theme->{'includes'}, > >- # templates to exclude from testing because >+ # templates or dirs to exclude from testing because > # they cannot stand alone >- 'ill/backends/Standard/shared/forms/article.inc', >- 'ill/backends/Standard/shared/forms/book.inc', >- 'ill/backends/Standard/shared/forms/chapter.inc', >- 'ill/backends/Standard/shared/forms/conference.inc', >- 'ill/backends/Standard/shared/forms/dvd.inc', >- 'ill/backends/Standard/shared/forms/journal.inc', >- 'ill/backends/Standard/shared/forms/resource.inc', >- 'ill/backends/Standard/shared/forms/thesis.inc', >+ 'ill/backends/Standard/shared/forms' > ); > } > $pm->finish; >@@ -150,7 +136,7 @@ sub create_template_test { > } > ); > foreach my $exclusion (@exclusions) { >- if ( $_ =~ /${exclusion}$/ ) { >+ if ( $_ =~ /${exclusion}/ ) { > diag("excluding template $_ because it cannot stand on its own"); > return; > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39741
:
181462
| 181559