Only .pref are considered yaml files.
kohadev-koha@kohadevbox:/kohadevbox/koha$ time prove xt/yaml_valid.t
xt/yaml_valid.t .. 1/19
# Failed test 'borrowers.json is YAML'
# at xt/yaml_valid.t line 39.
# Failed test 'items.json is YAML'
# at xt/yaml_valid.t line 39.
# Looks like you failed 2 tests of 19.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a .perlcriticrc (copied from qa-test-tools) and fixes
almost all perlcrictic violations according to this .perlcriticrc
The remaining violations are silenced out by appending a '## no critic'
to the offending lines. They can still be seen by using the --force
option of perlcritic
This patch also modify t/00-testcritic.t to check all Perl files using
the new .perlcriticrc.
I'm not sure if this test script is still useful as it is now equivalent
to `perlcritic --quiet .` and it looks like it is much slower
(approximatively 5 times slower on my machine)
Test plan:
1. Run `perlcritic --quiet .` from the root directory. It should output
nothing
2. Run `perlcritic --quiet --force .`. It should output 7 errors (6
StringyEval, 1 BarewordFileHandles)
3. Run `TEST_QA=1 prove t/00-testcritic.t`
4. Read the patch. Check that all changes make sense and do not
introduce undesired behaviour
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This follow-up removes the tests for the presence and validity of the
spanish translated notices.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
File adjust to run tests and be executed on all our codebase.
Test plan:
- Apply this patch without the other one
- run the tests
=> Several failures
- apply the other patch
- run the tests
=> Should pass now
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The QA script call 'missing_filters', it sounds better to keep it in
order to avoid fixing it and have a weird condition (if
module->can('subroutine_name')) to maintain
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
See bug 13618 and bug 21526.
We need a script to add missing filters, or replace wrong ones.
Test plan:
- Add unescaped variables to .tt files
- prove xt/find-missing-filters.t
will warn about them
- perl misc/devel/add_missing_filters.pl
will add the missing/wrong filters
- prove xt/find-missing-filters.t
will now be happy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To make it reusable easily from QA test tools
https://gitlab.com/koha-community/qa-test-tools/issues/3
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
From Jenkins:
koha_1 | # Failed test 'staff_prog templates are translatable'
koha_1 | # at xt/author/translatable-templates.t line 87.
koha_1 | # Can't locate TmplTokenizer.pm in @INC (you may need to install the TmplTokenizer module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./tmpl_process3.pl line 20.
On Stretch, '.' is not longer added to @INC, see bug 17717 for more info
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The file is no longer used (is it?) and the project looks dead. Let
remove that file.
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test Case:
Check the following files have been updated from
use strict;
use warnings;
to
use Modern::Perl;
author/podcorrectness.t
author/show-template-structure.pl
author/translatable-templates.t
author/valid-templates.t
find-license-problems
fix-old-fsf-address
single_quotes.t
verify-debian-docbook.t
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If you run `prove xt/author/pod_spell.t` without having Test::Spelling installed, it will skip the tests.
If you install the lib-test-spelling-perl, the test will fail:
xt/author/pod_spell.t .. You said to run 0 tests at xt/author/pod_spell.t line 21.
xt/author/pod_spell.t .. Dubious, test returned 25 (wstat 6400, 0x1900)
No subtests run
This is because the call to all_pod_files_spelling_ok is expecting a path
If we try to fix it with adding "." as parameter, the tests will raise tone of errors.
Let's remove this file
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug Description:
When performing a unit test on xt/sample_notices.t with the command
'prove xt/sample_notices.t' 11 tests fail with the error message
"No sample notice to delete".
Cause of bug:
The failures are caused by an incorrect file path on Line 25 of
xt/sample_notices.t.
Patch Description:
This patch corrects the failures by changing $base_notices_file from
"en/default/sample_notices.sql" to "en/mandatory/sample_notices.sql"
Test Plan:
1) Drop into koha-shell and run the command 'prove xt/sample_notices.'
2) 11 unit tests fail.
3) Apply the patch.
4) Re-run 'prove xt/sample_notices.t'
5) All of the tests pass now.
6) Quit out of koha-shell
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
While it might be an idea to just delete it,
this patch attempts to catch everything and make it
clear that Text::CSV::Unicode (binary) is the parser
that should be used.
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Running 'prove xt/author/Text_CSV_Various.t' passes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Tested 3 patches together on current master
- Dropped database
- Recreated database
- Went through installer
- Language en, Marc21
- Installed mandatory data only
- Went through Onboarding tool
- After finishing, logged in as superlibrarian
that was created by onboarding tool
Everything worked fine.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Add fr-CA installer to xt/sample_letter.t
To test:
- Verify xt/sample_letter.t test checks fr-CA now and
fails for just fr-CA.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Caitlin Goodger <caitlingoodger.student@wegc.school.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This patch fixes it.
To test:
- Run
$ prove xt/author/icondirectories.t
=> FAIL: Tests fail:
Failed test 'opac_icon_directory: koha-tmpl/opac-tmpl/xslt/itemtypeimg exists'
- Apply the patch
- Run
$ prove xt/author/icondirectories.t
=> SUCCESS: Tests pass and don't raise warnings.
- Sign off
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Bug 15527 introduced a new directory (xslt) on the top level OPAC templates
directory. The tt_valid.t script should include that top level dir on the list
of excluded dirs so it doesn't look for themes there.
To test:
- Run
$ prove xt/tt_valid.t
=> FAIL: You get the following warning:
Can't stat koha-tmpl/opac-tmpl/xslt/en: No such file or directory
at xt/tt_valid.t line 8
- Apply the patch
- Run
$ prove xt/tt_valid.t
=> SUCCESS: Tests pass and don't raise warnings.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
There's no longer a need for this tests, as their goal was
to make sure en (the basis) was in sync with the translated
files.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Most of them were found and fixed using codespell.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
http://bugs.koha-community.org/show_bug.cgi?id=14383
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test:
- Apply the first patch [1/2] containing a new test checking <body> tags in all
templates
- Run the test: prove xt/tt_valid.t
- You get a list of templates with invalid <body> tags.
- Apply the second patch [2/2] fixing all invalid <body> tags.
- Re-run the test: It passes.
Folowed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This test identifies incoherences between translated sample notices and the
'en' reference file.
Koha sample notices are loaded to 'letter' table from a text SQL file
during Koha installation by web installer. The reference file is the one
provided for English (en) installation :
<koha_root>/installer/data/mysql/en/mandatory/sample_notices.sql
Alternatives files are provided for other languages. Those files are difficult
to keep synchronized with reference file. This could be an functional issue
since some Koha operation depend on notice existence, for example Print Slip in
Circulation.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test works and identify missing notices
A few koha-qa errors fixed in followup
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12233 removed the prog and CCSR theme directories, so the number
of tests needs to be fixed.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch removes explicit references of themes from
xt/author/icondirectories.t
xt/author/translatable-templates.t
xt/author/valid-templates.t
xt/single_quotes.t
xt/tt_valid.t
For xt/author/icondirectories.t it fixes a small difference on
two bootstrap files, previously unchecked, crystal-clear/_COPYING.txt
and crystal-clear/_README.txt
Some updates to license information
To test:
1. Apply the patch
2. Run each test, all must pass
prove xt/author/icondirectories.t xt/author/translatable-templates.t xt/author/valid-templates.t xt/single_quotes.t xt/tt_valid.t
3. Try to fail each test
a) xt/author/icondirectories.t
create a new file on any of icon dirs, e.g.
touch koha-tmpl/opac-tmpl/bootstrap/itemtypeimg/newfile.png
test must fail
b) xt/author/translatable-templates.t
change the name of 'en' dir on any theme opac or staff
test must fail
Add following line to any template file
<span [% IF ( value ) %]name="name"[% ELSE %] js="_('">TEST [% INCLUDE 'fail.inc' %]</span>
c) xt/author/valid-templates.t must fail
d) xt/single_quotes.t must fail
e) xt/tt_valid.t must fail
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
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>
Per bug 6458, template constructs of the form
<li [% IF (foo) %]selected="selected"[% END %]...
are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:
<li [%- IF (foo) -%]selected="selected"[%- END -%]...
This patch corrects the issue.
To test:
[1] Temporarily add the following line to a template file:
<li [%- IF a -%]a="a"[%- END -%] />
[2] Run prove -v xt/tt_valid.t. Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test. This time,
an error should be reported.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, detects the forbidden pattern
No koha-qa errors.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Detail page tabs are not displayed properly because JavaScript is broken
in French. This is due to _(' JS string construction used in place of
_(".
This patch fixes:
- opac-detail.tt page
- xt/single_quotes to test bootstrap theme
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested by applying the patch, running translate update, then translate
install. Saw no JavaScript error on the French detail page.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switches from single to double quotes for translatatable strings.
Unit tests for xt/single_quotes passes now.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
To test:
* run xt/verify-debian-docbook.t and make sure it's all OK
* modify an xml file in debian/docs, try again, make sure it fails
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Running "prove -v xt/verify-debian-docbook.t" loops through all the
XML files in debian/docs and reports them as being ok.
- Removing a "<" from one of the files makes the test report it as
an error
- I did not verify that the test actually trips up a package build
if there is invalid XML.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested by adding single quotes to a translation-escaped string.
Test correctly failed it.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
http://bugs.koha-community.org/show_bug.cgi?id=5327
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
$ prove yaml_valid.t
checks a closed list of files
$ perl yaml_valid.pl -f myfile.yaml
try to load a yaml file with YAML::LoadFile and show errors
(both files pertidied)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Add the permissions files for es-ES and nb-NO to the permissions test.
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Running xt/permissions.t before the patch leaves out nb-NO and es-ES.
After the patch they are picked up and the test fails correctly
because of the missing permissions described in Bug 7984.
As far as I can tall, all permission files are now picked up by
this test.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Aleksa Vujicic <aleksa@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended to replace some copy-and-paste comments only with consent of MJR.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.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)
Bug 6537 - Move installer/data/mysql/en/mandatory/sysprefs.sql to installer/data/mysql/sysprefs.sql
Bug 6537 - Make the web installer use installer/data/mysql/sysprefs.sql
Bug 6537 - New syspref files with only the prefs that differ from the default
I have mostly deleted old syspref files and created new ones, with a new name,
mainly in order to reduce the risk of merge conflicts if the old syspref files
are changed before this patch is pushed, if it is pushed.
See http://wiki.koha-community.org/wiki/Simplified_syspref_handling_RFC for
a description of how the new files were created to reflect sysprefs that
differ from the global default.
.txt files have been moved to reflect the new names of the SQL files they are
associated with.
Bug 6537 - Remove syspref-related tests in xt/
As far as I can see, the previous patches for this bug makes the syspref tests
obsolete, and this patch removes them:
xt/syspref.t
xt/check_sysprefs.t
Bug 6537 - Fix a problem in French syspref file
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This test validate Template Toolkit (TT) Koha files.
For the time being an unique validation is done: Test if TT files
contain TT directive within HTML tag. For example:
<li[% IF
This kind of constuction MUST be avoided because it break Koha
translation process.
This patch transform also translation specific modules into C4 modules
in order to be able to use them in test case:
C4::TTPaser
C4::TmplToken
C4::TmplTokenType
This patch is a Perl adaptation of a Haskell script from Frère Sébastien
Marie.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on testing:
- translate install de-DE - worked ok
- translate update de-DE > translate install de-DE - worked ok
- running the test xt/tt_valid.t - worked ok and pointed out lots of problems.
Found no problems.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
* use root of source tree as base directory
* ignore case when comparing system preference codes;
at present this is also case-insenstive in the database
* added German sysprefs file
* corrected paths to Russian and Ukrainian system preference files
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
* now looks for permissions SQL files in the current
source tree, not in intranetdir; tests in xt/ and
t/ are meant to be run without requiring a full Koha
installation
* added path to German
* fixed paths to permissions SQL for Russian and Ukrainian
* handles case where SQL script contains more than just
inserts into to permissions
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Removed instances of 'use YAML' that were either completely
unnecessary or which were used only in debug code. Also
removed a needless import of Data::Dumper.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
The license and non-UTF8 file checks are closer to
author tests and don't really belong at the top level of the
Koha source tree. Follow-up might be to converted them
to test cases in xt/author that can be run by prove(1).
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>
Adds a non-test mode (--showsql option) that displays the missing sysprefs as sql inserts.
Some sysprefs were missed from the syspref file due to extra spaces in the insert : fixed.
The test now checks if there are at least as many sysprefs in the database as in the syspref file (instead of checking for the exact number)
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 patch adds xt/perltidyrc, a suggested perltidy configuration file.
It's in the xt directory because I'd like to eventually tie it in with Test::Perl::Critic
to run automated tests on tidyness and other Perl::Critic policies. That stuff belongs in
the xt directory since it's testing for developers use only.
I have only turned on a few directives based on the suggestions by MJ, historical discussion on
the mailing lists, and what I was told when I started contributing to koha. There are many other
directives in this file that are commented out. They are supposed to represent the defaults and
can be adjusted in the future if desired.
Use of this file is encouraged, but not required. It would be really nice if you could at least run
it on new files that you contribute. I would recommend not running it on files that are already
part of koha without writing some tests for those files and discussing your intentions to reformat
entire files in bulk.
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>