Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.
This patch changes the occurences of '.tmpl' in favour of '.tt'.
To test:
- Apply the patch
- Install koha, and verify that every page can be accesed
Regards
To+
P.S. a followup will remove the glue code.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This fixes a minor POD error detected, and also adds the Koha/ directory
to the regular test case so that the in-repo tests can find these
things.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Two of the template includes in the Bootstrap theme cannot be tested
all by themselves because they require that the template that includes
them define BLOCKs. This patch ensures that they are excluded
from individual testing; they will get exercised sufficiently by being
including by all of the other Bootstrap templates.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
valid-templates.t actually tests the templates and includes of only
the "prog" theme at opac and intranet. It does not test the opac
templates and includes of bootstrap theme, nor ccsr. This is critical
since this test is used for patch integrations in release maintenance.
This patch adds the test of bootstrap opac theme.
I did not manage to add the ccsr theme since it is not a real theme,
meaning it has no templates and not all includes.
Test by runnning perl xt/author/valid-templates.t and looking at the
logs.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Now there are 902 lines, bootstrap tested (1 error detected!)
No koha-qa errors
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Depending on your locale, msgmerge will return a different messages, enclosed in .... and .
The flow is not utf8 compliant, so this patch switches to testing "..... anything." instead of ".... word."
Now the test work on my (french setup)
NOTE: This should be properly fixed at some point in 3.4
This may help:
http://www.perlmonks.org/?node_id=150748
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
From the POD:
NAME
show-template-structure.pl
DESCRIPTION
This script displays the structure of loops and conditional statements in
an HTML::Template::Pro template, and is an aid for debugging errors
reported by the xt/author/valid-templates.t test. It also identifies the
following errors:
* TMPL_IF/TMPL_UNLESS/TMPL_LOOP with no closing tag
* TMPL_ELSE with no initial TMPL_IF or TMPL_UNLESS
* extra closing tags
* HTML comment of the form <!-- TMPL_FOO ..., where TMPL_FOO is not a valid HTML::Template::Pro tag
USAGE
xt/author/show-template-structure.pl path/to/template.tmpl
Output is sent to STDOUT.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Added a new author test to look for syntax errors
in the HTML templates. Run by doing
prove xt/author/valid-templates.t
from the root of a Koha source tree.
This test will help catch the following errors:
* unbalanced TMPL_IF, TMPL_UNLESS, and TMPL_LOOP contructs, e.g.,
cases where a TMPL_IF is not closed by a /TMPL_IF.
* references to nonexistant include files
* syntax errors within a HTML::Template::Pro tag
This test currently ignores errors related to TMPL_IF EXPR, which
is currently deprecated for use in Koha -- this may be made
stricter in the future.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
the icondirectories.t test depends on the database, so it needed to be
moved. But, it's really more of an author test since it's testinging the
correct structure of our distribution, so I'm moving it to xt/author.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This test verifies that the English OPAC and staff templates
can be processed by the string extractor (tmpl_process3.pl)
without error. If a template contains a parsing error
(at least as far as tmpl_process3.pl is concerned), it may
not be correctly converted when a language translation
is applied.
To run this test, do
prove -v xt/author/translatable-templates.t
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This test script checks all perl files in the C4 directory for POD correctness. It is
completely optional, and as of yet, is not actually run when you run the test suite.
It's just a handy way to check our POD documentation, which should be correct before
we release code.
This script can be invoked with 'prove -v xt/author/podcorrectness.t'
Additionally, this is the first test in the 'xt' directory. Current perl testing practices
have reserved the 'xt' directory for tests that should be run by the code authors before
release. See:
http://perl-qa.hexten.net/wiki/index.php/Oslo_QA_Hackathon_2008_:Achievements#Testing_Best_Practices
for more information.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>