From 1d91e75c53e7da5bf2c1b334f5aeecf241dc5ec4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 14 Oct 2009 10:44:36 +0200 Subject: [PATCH] =?utf8?q?Automatisierte=20Syntaxtests,=20Framework=20f?= =?utf8?q?=C3=BCr=20sp=C3=A4tere=20Modultests.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Selenium Tests nach old verschoben, deprecated. --- t/001compile.t | 108 +++++++++++++ t/002goodperl.t | 129 +++++++++++++++ t/003safesys.t | 65 ++++++++ t/004template.t | 152 ++++++++++++++++++ t/005no_tabs.t | 55 +++++++ t/006spellcheck.t | 95 +++++++++++ t/011pod.t | 60 +++++++ t/Support/Files.pm | 82 ++++++++++ t/Support/Systemexec.pm | 14 ++ t/Support/Templates.pm | 151 +++++++++++++++++ t/{ => old}/README | 0 t/{ => old}/README.de | 0 t/{ => old}/backend/README.backend | 0 t/{ => old}/demolx/AllTests.t | 0 t/{ => old}/demolx/README | 0 t/{ => old}/demolx/cleanup.pl | 0 .../testscripts/001CreateTestDatabase.t | 0 .../demolx/testscripts/002CreateTestUser.t | 0 .../demolx/testscripts/005UpdateDatabase.t | 0 .../demolx/testscripts/K998DeleteTestUser.t | 0 .../testscripts/K999DeleteTestDatabase.t | 0 t/{ => old}/demolx/testscripts/README | 0 t/{ => old}/frontend/README.frontend | 0 t/{ => old}/lx-office.t | 0 t/{ => old}/lxtest.conf.default | 0 t/{ => old}/selenium/AllTests.t | 0 t/{ => old}/selenium/README | 0 t/{ => old}/selenium/TestAccounting.t | 0 t/{ => old}/selenium/TestAdmin.t | 0 t/{ => old}/selenium/TestAllTests.t | 0 t/{ => old}/selenium/TestCreateTestbed.t | 0 t/{ => old}/selenium/TestMasterData.t | 0 t/{ => old}/selenium/TestPayments.t | 0 t/{ => old}/selenium/TestPrinting.t | 0 t/{ => old}/selenium/TestProgramm.t | 0 t/{ => old}/selenium/TestPurchase.t | 0 t/{ => old}/selenium/TestReports.t | 0 t/{ => old}/selenium/TestSelling.t | 0 t/{ => old}/selenium/TestSystem.t | 0 t/{ => old}/selenium/cleanup.pl | 0 .../incomming/ustva-Inland-linet.html | 0 t/{ => old}/selenium/testscripts/README | 0 .../testscripts/accounting/begin/A000Login.t | 0 .../testscripts/accounting/begin/A999Logout.t | 0 .../testscripts/accounting/end/A000Login.t | 0 .../testscripts/accounting/end/A999Logout.t | 0 .../begin/A001CreateTestDatabase.t | 0 .../administration/begin/A002CreateTestUser.t | 0 .../administration/begin/A003UpdateDatabase.t | 0 .../administration/end/A998DeleteTestUser.t | 0 .../end/A999DeleteTestDatabase.t | 0 .../selenium/testscripts/base/000Login.t | 0 .../selenium/testscripts/base/999Logout.t | 0 .../testscripts/masterdata/begin/M000Login.t | 0 .../masterdata/begin/M001CreateCustomer.t | 0 .../masterdata/begin/M002CreateVendor.t | 0 .../masterdata/begin/M003CreateGoods.t | 0 .../masterdata/begin/M004AddService.t | 0 .../masterdata/begin/M005AddProduct.t | 0 .../masterdata/begin/M006AddProject.t | 0 .../testscripts/masterdata/begin/M999Logout.t | 0 .../testscripts/masterdata/end/M000Login.t | 0 .../masterdata/end/M995DeleteGoods.t | 0 .../masterdata/end/M996DeleteProject.t | 0 .../masterdata/end/M997DeleteService.t | 0 .../masterdata/end/M998DeleteProduct.t | 0 .../testscripts/masterdata/end/M999Logout.t | 0 .../testscripts/payments/begin/P000Login.t | 0 .../testscripts/payments/begin/P999Logout.t | 0 .../testscripts/payments/end/P000Login.t | 0 .../testscripts/payments/end/P999Logout.t | 0 .../testscripts/printing/begin/P000Login.t | 0 .../testscripts/printing/begin/P999Logout.t | 0 .../testscripts/printing/end/P000Login.t | 0 .../testscripts/printing/end/P999Logout.t | 0 .../testscripts/programm/begin/P000Login.t | 0 .../testscripts/programm/begin/P999Logout.t | 0 .../testscripts/programm/end/P000Login.t | 0 .../testscripts/programm/end/P999Logout.t | 0 .../testscripts/purchase/begin/P000Login.t | 0 .../purchase/begin/P001CreateQuoteRequest.t | 0 .../testscripts/purchase/begin/P999Logout.t | 0 .../testscripts/purchase/end/P000Login.t | 0 .../testscripts/purchase/end/P999Logout.t | 0 .../testscripts/reports/begin/R000Login.t | 0 .../testscripts/reports/begin/R999Logout.t | 0 .../testscripts/reports/end/R000Login.t | 0 .../testscripts/reports/end/R999Logout.t | 0 .../testscripts/selling/begin/S000Login.t | 0 .../selling/begin/S001CreateOffers.t | 0 .../selling/begin/S002CreateCharge.t | 0 .../selling/begin/S003CreateInvoice.t | 0 .../testscripts/selling/begin/S999Logout.t | 0 .../testscripts/selling/end/S000Login.t | 0 .../testscripts/selling/end/S999Logout.t | 0 .../testscripts/system/begin/S000Login.t | 0 .../system/begin/S001CreateProductGroups.t | 0 .../system/begin/S002CreatePriceBrackets.t | 0 .../system/begin/S003AddLanguage.t | 0 .../system/begin/S004ShowLanguages.t | 0 .../system/begin/S005AddPaymentConditions.t | 0 .../system/begin/S006ShowPaymentConditions.t | 0 .../system/begin/S007AddCustomerVendorTypes.t | 0 .../begin/S008ShowCustomerVendorTypes.t | 0 .../system/begin/S009AddShowDeleteMeasure.t | 0 .../begin/S010AddShowDeleteServiceMeasure.t | 0 .../system/begin/S011CreateAccount.t | 0 .../system/begin/S012ShowAccount.t | 0 .../system/begin/S013TestAccount.t | 0 .../testscripts/system/begin/S999Logout.t | 0 .../testscripts/system/end/S000Login.t | 0 .../system/end/S992DeleteProductGroups.t | 0 .../system/end/S994DeleteAccount.t | 0 .../end/S995DeleteCustomerVendorTypes.t | 0 .../system/end/S996DeletePaymentConditions.t | 0 .../system/end/S997DeleteLanguages.t | 0 .../system/end/S998DeletePriceBrackets.t | 0 .../testscripts/system/end/S999Logout.t | 0 t/test.sh | 1 + 119 files changed, 912 insertions(+) create mode 100644 t/001compile.t create mode 100644 t/002goodperl.t create mode 100644 t/003safesys.t create mode 100644 t/004template.t create mode 100644 t/005no_tabs.t create mode 100644 t/006spellcheck.t create mode 100644 t/011pod.t create mode 100644 t/Support/Files.pm create mode 100644 t/Support/Systemexec.pm create mode 100644 t/Support/Templates.pm rename t/{ => old}/README (100%) rename t/{ => old}/README.de (100%) rename t/{ => old}/backend/README.backend (100%) rename t/{ => old}/demolx/AllTests.t (100%) rename t/{ => old}/demolx/README (100%) rename t/{ => old}/demolx/cleanup.pl (100%) rename t/{ => old}/demolx/testscripts/001CreateTestDatabase.t (100%) rename t/{ => old}/demolx/testscripts/002CreateTestUser.t (100%) rename t/{ => old}/demolx/testscripts/005UpdateDatabase.t (100%) rename t/{ => old}/demolx/testscripts/K998DeleteTestUser.t (100%) rename t/{ => old}/demolx/testscripts/K999DeleteTestDatabase.t (100%) rename t/{ => old}/demolx/testscripts/README (100%) rename t/{ => old}/frontend/README.frontend (100%) rename t/{ => old}/lx-office.t (100%) rename t/{ => old}/lxtest.conf.default (100%) rename t/{ => old}/selenium/AllTests.t (100%) rename t/{ => old}/selenium/README (100%) rename t/{ => old}/selenium/TestAccounting.t (100%) rename t/{ => old}/selenium/TestAdmin.t (100%) rename t/{ => old}/selenium/TestAllTests.t (100%) rename t/{ => old}/selenium/TestCreateTestbed.t (100%) rename t/{ => old}/selenium/TestMasterData.t (100%) rename t/{ => old}/selenium/TestPayments.t (100%) rename t/{ => old}/selenium/TestPrinting.t (100%) rename t/{ => old}/selenium/TestProgramm.t (100%) rename t/{ => old}/selenium/TestPurchase.t (100%) rename t/{ => old}/selenium/TestReports.t (100%) rename t/{ => old}/selenium/TestSelling.t (100%) rename t/{ => old}/selenium/TestSystem.t (100%) rename t/{ => old}/selenium/cleanup.pl (100%) rename t/{ => old}/selenium/incomming/ustva-Inland-linet.html (100%) rename t/{ => old}/selenium/testscripts/README (100%) rename t/{ => old}/selenium/testscripts/accounting/begin/A000Login.t (100%) rename t/{ => old}/selenium/testscripts/accounting/begin/A999Logout.t (100%) rename t/{ => old}/selenium/testscripts/accounting/end/A000Login.t (100%) rename t/{ => old}/selenium/testscripts/accounting/end/A999Logout.t (100%) rename t/{ => old}/selenium/testscripts/administration/begin/A001CreateTestDatabase.t (100%) rename t/{ => old}/selenium/testscripts/administration/begin/A002CreateTestUser.t (100%) rename t/{ => old}/selenium/testscripts/administration/begin/A003UpdateDatabase.t (100%) rename t/{ => old}/selenium/testscripts/administration/end/A998DeleteTestUser.t (100%) rename t/{ => old}/selenium/testscripts/administration/end/A999DeleteTestDatabase.t (100%) rename t/{ => old}/selenium/testscripts/base/000Login.t (100%) rename t/{ => old}/selenium/testscripts/base/999Logout.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M000Login.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M001CreateCustomer.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M002CreateVendor.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M003CreateGoods.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M004AddService.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M005AddProduct.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M006AddProject.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/begin/M999Logout.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/end/M000Login.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/end/M995DeleteGoods.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/end/M996DeleteProject.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/end/M997DeleteService.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/end/M998DeleteProduct.t (100%) rename t/{ => old}/selenium/testscripts/masterdata/end/M999Logout.t (100%) rename t/{ => old}/selenium/testscripts/payments/begin/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/payments/begin/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/payments/end/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/payments/end/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/printing/begin/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/printing/begin/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/printing/end/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/printing/end/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/programm/begin/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/programm/begin/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/programm/end/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/programm/end/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/purchase/begin/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t (100%) rename t/{ => old}/selenium/testscripts/purchase/begin/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/purchase/end/P000Login.t (100%) rename t/{ => old}/selenium/testscripts/purchase/end/P999Logout.t (100%) rename t/{ => old}/selenium/testscripts/reports/begin/R000Login.t (100%) rename t/{ => old}/selenium/testscripts/reports/begin/R999Logout.t (100%) rename t/{ => old}/selenium/testscripts/reports/end/R000Login.t (100%) rename t/{ => old}/selenium/testscripts/reports/end/R999Logout.t (100%) rename t/{ => old}/selenium/testscripts/selling/begin/S000Login.t (100%) rename t/{ => old}/selenium/testscripts/selling/begin/S001CreateOffers.t (100%) rename t/{ => old}/selenium/testscripts/selling/begin/S002CreateCharge.t (100%) rename t/{ => old}/selenium/testscripts/selling/begin/S003CreateInvoice.t (100%) rename t/{ => old}/selenium/testscripts/selling/begin/S999Logout.t (100%) rename t/{ => old}/selenium/testscripts/selling/end/S000Login.t (100%) rename t/{ => old}/selenium/testscripts/selling/end/S999Logout.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S000Login.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S001CreateProductGroups.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S002CreatePriceBrackets.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S003AddLanguage.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S004ShowLanguages.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S005AddPaymentConditions.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S006ShowPaymentConditions.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S011CreateAccount.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S012ShowAccount.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S013TestAccount.t (100%) rename t/{ => old}/selenium/testscripts/system/begin/S999Logout.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S000Login.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S992DeleteProductGroups.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S994DeleteAccount.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S996DeletePaymentConditions.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S997DeleteLanguages.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S998DeletePriceBrackets.t (100%) rename t/{ => old}/selenium/testscripts/system/end/S999Logout.t (100%) create mode 100755 t/test.sh diff --git a/t/001compile.t b/t/001compile.t new file mode 100644 index 000000000..1053a6b07 --- /dev/null +++ b/t/001compile.t @@ -0,0 +1,108 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton + + +################# +#Bugzilla Test 1# +###Compilation### + +use strict; + +use lib 't'; +use lib '../modules/override'; +use lib '../modules/fallback'; + +use Support::Files; + +use Test::More tests => scalar(@Support::Files::testitems); + +# Need this to get the available driver information +use DBI; +my @DBI_drivers = DBI->available_drivers; + +# Bugzilla requires Perl 5.8.0 now. Checksetup will tell you this if you run it, but +# it tests it in a polite/passive way that won't make it fail at compile time. We'll +# slip in a compile-time failure if it's missing here so a tinderbox on < 5.8 won't +# pass and mistakenly let people think Bugzilla works on any perl below 5.8. +require 5.008; + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; +my $perlapp = "\"$^X\""; + +# Test the scripts by compiling them + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + + # Skip mod_perl.pl in all cases. It doesn't compile correctly from the command line. + if ($file eq 'mod_perl.pl') { + ok(1, "Skipping mod_perl.pl"); + next; + } + + # Check that we have a DBI module to support the DB, if this is a database + # module (but not Schema) + if ($file =~ m#Bugzilla/DB/([^/]+)\.pm$# && $file ne "Bugzilla/DB/Schema.pm") { + if (!grep(lc($_) =~ /$1/i, @DBI_drivers)) { + ok(1,$file." - Skipping, as the DBD module not installed"); + next; + } + } + + open (FILE,$file); + my $bang = ; + close (FILE); + my $T = ""; + if ($bang =~ m/#!\S*perl\s+-.*T/) { + $T = "T"; + } + my $command = "$perlapp -c$T -I modules/fallback -I modules/override $file 2>&1"; + my $loginfo=`$command`; + #print '@@'.$loginfo.'##'; + if ($loginfo =~ /syntax ok$/im) { + if ($loginfo ne "$file syntax OK\n") { + ok(0,$file." --WARNING"); + print $fh $loginfo; + } else { + ok(1,$file); + } + } else { + ok(0,$file." --ERROR"); + print $fh $loginfo; + } +} + +exit 0; diff --git a/t/002goodperl.t b/t/002goodperl.t new file mode 100644 index 000000000..3196d0057 --- /dev/null +++ b/t/002goodperl.t @@ -0,0 +1,129 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton +# Jacob Steenhagen +# David D. Kilzer + + +################# +#Bugzilla Test 2# +####GoodPerl##### + +use strict; + +use lib 't'; + +use Support::Files; + +use Test::More tests => (scalar(@Support::Files::testitems) * 3); + +my @testitems = @Support::Files::testitems; # get the files to test. + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + } + my $file_line1 = ; + close (FILE); + + $file =~ m/.*\.(.*)/; + my $ext = $1; + + if ($file_line1 !~ m/^#\!/) { + ok(1,"$file does not have a shebang"); + } else { + my $flags; + if (!defined $ext || $ext eq "pl") { + # standalone programs aren't taint checked yet + $flags = "w"; + } elsif ($ext eq "pm") { + ok(0, "$file is a module, but has a shebang"); + next; + } elsif ($ext eq "cgi") { + # cgi files must be taint checked + $flags = "wT"; + } else { + ok(0, "$file has shebang but unknown extension"); + next; + } + + if ($file_line1 =~ m#^\#\!/usr/bin/perl\s#) { + if ($file_line1 =~ m#\s-$flags#) { + ok(1,"$file uses standard perl location and -$flags"); + } else { + ok(0,"$file is MISSING -$flags --WARNING"); + } + } else { + ok(0,"$file uses non-standard perl location"); + } + } +} + +foreach my $file (@testitems) { + my $found_use_strict = 0; + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + next; + } + while (my $file_line = ) { + if ($file_line =~ m/^\s*use strict/) { + $found_use_strict = 1; + last; + } + } + close (FILE); + if ($found_use_strict) { + ok(1,"$file uses strict"); + } else { + ok(0,"$file DOES NOT use strict --WARNING"); + } +} + +# Check to see that all error messages use tags (for l10n reasons.) +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + if (! open (FILE, $file)) { + ok(0,"could not open $file --WARNING"); + next; + } + my $lineno = 0; + my $error = 0; + + while (!$error && (my $file_line = )) { + $lineno++; + if ($file_line =~ /Throw.*Error\("(.*?)"/) { + if ($1 =~ /\s/) { + ok(0,"$file has a Throw*Error call on line $lineno which doesn't use a tag --ERROR"); + $error = 1; + } + } + } + + ok(1,"$file uses Throw*Error calls correctly") if !$error; + + close(FILE); +} + +exit 0; diff --git a/t/003safesys.t b/t/003safesys.t new file mode 100644 index 000000000..b4f41f61c --- /dev/null +++ b/t/003safesys.t @@ -0,0 +1,65 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton + + +################# +#Bugzilla Test 3# +###Safesystem#### + +use strict; + +use lib 't'; + +use Support::Files; + +use Test::More tests => scalar(@Support::Files::testitems); + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; +my $perlapp = "\"$^X\""; + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + my $command = "$perlapp -c -It -MSupport::Systemexec $file 2>&1"; + my $loginfo=`$command`; + if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) { + ok(0,"$file DOES NOT use proper system or exec calls"); + print $fh $loginfo; + } else { + ok(1,"$file uses proper system and exec calls"); + } +} + +exit 0; diff --git a/t/004template.t b/t/004template.t new file mode 100644 index 000000000..becc6075d --- /dev/null +++ b/t/004template.t @@ -0,0 +1,152 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla tests. +# +# The Initial Developer of the Original Code is Jacob Steenhagen. +# Portions created by Jacob Steenhagen are +# Copyright (C) 2001 Jacob Steenhagen. All +# Rights Reserved. +# +# Contributor(s): Jacob Steenhagen +# Zach Lipton +# David D. Kilzer +# Tobias Burnus +# + +################# +#Bugzilla Test 4# +####Templates#### + +use strict; + +use lib 't'; + +use Support::Templates; + +# Bug 137589 - Disable command-line input of CGI.pm when testing +use CGI qw(-no_debug); + +use File::Spec; +use Template; +use Test::More tests => ( scalar(@referenced_files) * scalar(@languages) + + $num_actual_files ); + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +# Checks whether one of the passed files exists +sub existOnce { + foreach my $file (@_) { + return $file if -e $file; + } + return 0; +} + +# Check to make sure all templates that are referenced in +# Bugzilla exist in the proper place. + +foreach my $lang (@languages) { + foreach my $file (@referenced_files) { + my @path = map(File::Spec->catfile($_, $file), + split(':', $include_path{$lang} . ":" . $include_path{"en"})); + if (my $path = existOnce(@path)) { + ok(1, "$path exists"); + } else { + ok(0, "$file cannot be located --ERROR"); + print $fh "Looked in:\n " . join("\n ", @path) . "\n"; + } + } +} + +foreach my $include_path (@include_paths) { + # Processes all the templates to make sure they have good syntax + my $provider = Template::Provider->new( + { + INCLUDE_PATH => $include_path , + # Need to define filters used in the codebase, they don't + # actually have to function in this test, just be defined. + # See Template.pm for the actual codebase definitions. + + # Initialize templates (f.e. by loading plugins like Hook). + PRE_PROCESS => "global/initialize.none.tmpl", + + FILTERS => + { + html_linebreak => sub { return $_; }, + no_break => sub { return $_; } , + js => sub { return $_ } , + base64 => sub { return $_ } , + inactive => [ sub { return sub { return $_; } }, 1] , + closed => [ sub { return sub { return $_; } }, 1] , + obsolete => [ sub { return sub { return $_; } }, 1] , + url_quote => sub { return $_ } , + css_class_quote => sub { return $_ } , + xml => sub { return $_ } , + quoteUrls => sub { return $_ } , + bug_link => [ sub { return sub { return $_; } }, 1] , + csv => sub { return $_ } , + unitconvert => sub { return $_ }, + time => sub { return $_ } , + wrap_comment => sub { return $_ }, + none => sub { return $_ } , + ics => [ sub { return sub { return $_; } }, 1] , + }, + } + ); + + foreach my $file (@{$actual_files{$include_path}}) { + my $path = File::Spec->catfile($include_path, $file); + if (-e $path) { + my ($data, $err) = $provider->fetch($file); + + if (!$err) { + ok(1, "$file syntax ok"); + } + else { + ok(0, "$file has bad syntax --ERROR"); + print $fh $data . "\n"; + } + } + else { + ok(1, "$path doesn't exist, skipping test"); + } + } + + # check to see that all templates have a version string: + # disabled for lx-office + +# foreach my $file (@{$actual_files{$include_path}}) { +# my $path = File::Spec->catfile($include_path, $file); +# open(TMPL, $path); +# my $firstline = ; +# if ($firstline =~ /\d+\.\d+\@[\w\.-]+/) { +# ok(1,"$file has a version string"); +# } else { +# ok(0,"$file does not have a version string --ERROR"); +# } +# close(TMPL); +# } +} + +exit 0; diff --git a/t/005no_tabs.t b/t/005no_tabs.t new file mode 100644 index 000000000..75f532956 --- /dev/null +++ b/t/005no_tabs.t @@ -0,0 +1,55 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla tests. +# +# The Initial Developer of the Original Code is Jacob Steenhagen. +# Portions created by Jacob Steenhagen are +# Copyright (C) 2001 Jacob Steenhagen. All +# Rights Reserved. +# +# Contributor(s): Jacob Steenhagen +# David D. Kilzer +# + +################# +#Bugzilla Test 5# +#####no_tabs##### + +use strict; + +use lib 't'; + +use Support::Files; +use Support::Templates; + +use File::Spec; +use Test::More tests => ( scalar(@Support::Files::testitems) + + $Support::Templates::num_actual_files); + +my @testitems = @Support::Files::testitems; +for my $path (@Support::Templates::include_paths) { + push(@testitems, map(File::Spec->catfile($path, $_), + Support::Templates::find_actual_files($path))); +} + +foreach my $file (@testitems) { + open (FILE, "$file"); + if (grep /\t/, ) { + ok(0, "$file contains tabs --WARNING"); + } else { + ok(1, "$file has no tabs"); + } + close (FILE); +} + +exit 0; diff --git a/t/006spellcheck.t b/t/006spellcheck.t new file mode 100644 index 000000000..67982b27b --- /dev/null +++ b/t/006spellcheck.t @@ -0,0 +1,95 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2002 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton + + +################# +#Bugzilla Test 6# +####Spelling##### + +use lib 't'; +use Support::Files; + +BEGIN { # yes the indenting is off, deal with it +#add the words to check here: +@evilwords = qw( +anyways +arbitary +databasa +dependan +existance +existant +paramater +varsion +fomr +); + +$testcount = scalar(@Support::Files::testitems); +} + +use Test::More tests => $testcount; + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; + +# at last, here we actually run the test... +my $evilwordsregexp = join('|', @evilwords); + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + + if (open (FILE, $file)) { # open the file for reading + + my $found_word = ''; + + while (my $file_line = ) { # and go through the file line by line + if ($file_line =~ /($evilwordsregexp)/i) { # found an evil word + $found_word = $1; + last; + } + } + + close (FILE); + + if ($found_word) { + ok(0,"$file: found SPELLING ERROR $found_word --WARNING"); + } else { + ok(1,"$file does not contain registered spelling errors"); + } + } else { + ok(0,"could not open $file for spellcheck --WARNING"); + } +} + +exit 0; diff --git a/t/011pod.t b/t/011pod.t new file mode 100644 index 000000000..517ca03ad --- /dev/null +++ b/t/011pod.t @@ -0,0 +1,60 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# Contributor(s): Frédéric Buclin + + +################## +#Bugzilla Test 11# +##POD validation## + +use strict; + +use lib 't'; + +use Support::Files; +use Pod::Checker; + +use Test::More tests => scalar(@Support::Files::testitems); + +# Capture the TESTOUT from Test::More or Test::Builder for printing errors. +# This will handle verbosity for us automatically. +my $fh; +{ + local $^W = 0; # Don't complain about non-existent filehandles + if (-e \*Test::More::TESTOUT) { + $fh = \*Test::More::TESTOUT; + } elsif (-e \*Test::Builder::TESTOUT) { + $fh = \*Test::Builder::TESTOUT; + } else { + $fh = \*STDOUT; + } +} + +my @testitems = @Support::Files::testitems; + +foreach my $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries + my $error_count = podchecker($file, $fh); + if ($error_count < 0) { + ok(1,"$file does not contain any POD"); + } elsif ($error_count == 0) { + ok(1,"$file has correct POD syntax"); + } else { + ok(0,"$file has incorrect POD syntax --ERROR"); + } +} + +exit 0; diff --git a/t/Support/Files.pm b/t/Support/Files.pm new file mode 100644 index 000000000..e485561a3 --- /dev/null +++ b/t/Support/Files.pm @@ -0,0 +1,82 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla Tests. +# +# The Initial Developer of the Original Code is Zach Lipton +# Portions created by Zach Lipton are +# Copyright (C) 2001 Zach Lipton. All +# Rights Reserved. +# +# Contributor(s): Zach Lipton +# Joel Peshkin + + +package Support::Files; + +use File::Find; + +# exclude_deps is a hash of arrays listing the files to be excluded +# if a module is not available +# +@additional_files = (); +%exclude_deps = ( + 'XML::Twig' => ['importxml.pl'], + 'Net::LDAP' => ['Bugzilla/Auth/Verify/LDAP.pm'], + 'Email::Reply' => ['email_in.pl'], + 'Email::MIME::Attachment::Stripper' => ['email_in.pl'] +); + + +@files = glob('*'); +find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, 'SL'); + +sub have_pkg { + my ($pkg) = @_; + my ($msg, $vnum, $vstr); + no strict 'refs'; + eval { my $p; ($p = $pkg . ".pm") =~ s!::!/!g; require $p; }; + return !($@); +} + +@exclude_files = (); +foreach $dep (keys(%exclude_deps)) { + if (!have_pkg($dep)) { + push @exclude_files, @{$exclude_deps{$dep}}; + } +} + +sub isTestingFile { + my ($file) = @_; + my $exclude; + foreach $exclude (@exclude_files) { + if ($file eq $exclude) { return undef; } # get rid of excluded files. + } + + if ($file =~ /\.cgi$|\.pl$|\.pm$/) { + return 1; + } + my $additional; + foreach $additional (@additional_files) { + if ($file eq $additional) { return 1; } + } + return undef; +} + +foreach $currentfile (@files) { + if (isTestingFile($currentfile)) { + push(@testitems,$currentfile); + } +} + + +1; diff --git a/t/Support/Systemexec.pm b/t/Support/Systemexec.pm new file mode 100644 index 000000000..676ee02a4 --- /dev/null +++ b/t/Support/Systemexec.pm @@ -0,0 +1,14 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- + +package Support::Systemexec; +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(system exec); +@EXPORT_OK = qw(); +sub system($$@) { + 1; +} +sub exec($$@) { + 1; +} +1; diff --git a/t/Support/Templates.pm b/t/Support/Templates.pm new file mode 100644 index 000000000..61dda11c7 --- /dev/null +++ b/t/Support/Templates.pm @@ -0,0 +1,151 @@ +# -*- Mode: perl; indent-tabs-mode: nil -*- +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code are the Bugzilla tests. +# +# The Initial Developer of the Original Code is Jacob Steenhagen. +# Portions created by Jacob Steenhagen are +# Copyright (C) 2001 Jacob Steenhagen. All +# Rights Reserved. +# +# Contributor(s): Jacob Steenhagen +# David D. Kilzer +# Tobias Burnus +# + +package Support::Templates; + +use strict; + +use lib 't'; +use base qw(Exporter); +@Support::Templates::EXPORT = + qw(@languages @include_paths %include_path @referenced_files + %actual_files $num_actual_files); +use vars qw(@languages @include_paths %include_path @referenced_files + %actual_files $num_actual_files); + +use Support::Files; + +use File::Find; +use File::Spec; + +# The available template languages +@languages = (); + +# The colon separated includepath per language +%include_path = (); + +# All include paths +@include_paths = (); + +# Files which are referenced in the cgi files +@referenced_files = (); + +# All files sorted by include_path +%actual_files = (); + +# total number of actual_files +$num_actual_files = 0; + +# Scan for the template available languages and include paths +#{ +# opendir(DIR, "templates/webpages") || die "Can't open 'templates': $!"; +# my @files = grep { /^[a-z-]+$/i } readdir(DIR); +# closedir DIR; +# +# foreach my $langdir (@files) { +# next if($langdir =~ /^CVS$/i); +# +# my $path = File::Spec->catdir('templates', $langdir, 'custom'); +# my @dirs = (); +# push(@dirs, $path) if(-d $path); +# $path = File::Spec->catdir('templates', $langdir, 'extension'); +# push(@dirs, $path) if(-d $path); +# $path = File::Spec->catdir('templates', $langdir, 'default'); +# push(@dirs, $path) if(-d $path); +# +# next if(scalar(@dirs) == 0); +# push(@languages, $langdir); +# push(@include_paths, @dirs); +# $include_path{$langdir} = join(":",@dirs); +# } +#} + +my @files; + +# Local subroutine used with File::Find +sub find_templates { + # Prune CVS directories + if (-d $_ && $_ eq 'CVS') { + $File::Find::prune = 1; + return; + } + + # Only include files ending in '.html' + if (-f $_ && $_ =~ m/\.html$/i) { + my $filename; + my $local_dir = File::Spec->abs2rel($File::Find::dir, + $File::Find::topdir); + + # File::Spec 3.13 and newer return "." instead of "" if both + # arguments of abs2rel() are identical. + $local_dir = "" if ($local_dir eq "."); + + if ($local_dir) { + $filename = File::Spec->catfile($local_dir, $_); + } else { + $filename = $_; + } + + push(@files, $filename); + } +} + +# Scan the given template include path for templates +sub find_actual_files { + my $include_path = $_[0]; + @files = (); + find(\&find_templates, $include_path); + return @files; +} + +@include_paths = qw(templates/webpages); + +foreach my $include_path (@include_paths) { + $actual_files{$include_path} = [ find_actual_files($include_path) ]; + $num_actual_files += scalar(@{$actual_files{$include_path}}); +} + +# Scan Bugzilla's perl code looking for templates used and put them +# in the @referenced_files array to be used by the 004template.t test. +my %seen; + +foreach my $file (@Support::Files::testitems) { + open (FILE, $file); + my @lines = ; + close (FILE); + foreach my $line (@lines) { +# if ($line =~ m/template->process\(\"(.+?)\", .+?\)/) { + if ($line =~ m/->parse_html_template\((['"])(.+?)\1/) { + my $template = $2; + # Ignore templates with $ in the name, since they're + # probably vars, not real files + next if $template =~ m/\$/; + next if $seen{$template}; + push (@referenced_files, $template); + $seen{$template} = 1; + } + } +} + +1; diff --git a/t/README b/t/old/README similarity index 100% rename from t/README rename to t/old/README diff --git a/t/README.de b/t/old/README.de similarity index 100% rename from t/README.de rename to t/old/README.de diff --git a/t/backend/README.backend b/t/old/backend/README.backend similarity index 100% rename from t/backend/README.backend rename to t/old/backend/README.backend diff --git a/t/demolx/AllTests.t b/t/old/demolx/AllTests.t similarity index 100% rename from t/demolx/AllTests.t rename to t/old/demolx/AllTests.t diff --git a/t/demolx/README b/t/old/demolx/README similarity index 100% rename from t/demolx/README rename to t/old/demolx/README diff --git a/t/demolx/cleanup.pl b/t/old/demolx/cleanup.pl similarity index 100% rename from t/demolx/cleanup.pl rename to t/old/demolx/cleanup.pl diff --git a/t/demolx/testscripts/001CreateTestDatabase.t b/t/old/demolx/testscripts/001CreateTestDatabase.t similarity index 100% rename from t/demolx/testscripts/001CreateTestDatabase.t rename to t/old/demolx/testscripts/001CreateTestDatabase.t diff --git a/t/demolx/testscripts/002CreateTestUser.t b/t/old/demolx/testscripts/002CreateTestUser.t similarity index 100% rename from t/demolx/testscripts/002CreateTestUser.t rename to t/old/demolx/testscripts/002CreateTestUser.t diff --git a/t/demolx/testscripts/005UpdateDatabase.t b/t/old/demolx/testscripts/005UpdateDatabase.t similarity index 100% rename from t/demolx/testscripts/005UpdateDatabase.t rename to t/old/demolx/testscripts/005UpdateDatabase.t diff --git a/t/demolx/testscripts/K998DeleteTestUser.t b/t/old/demolx/testscripts/K998DeleteTestUser.t similarity index 100% rename from t/demolx/testscripts/K998DeleteTestUser.t rename to t/old/demolx/testscripts/K998DeleteTestUser.t diff --git a/t/demolx/testscripts/K999DeleteTestDatabase.t b/t/old/demolx/testscripts/K999DeleteTestDatabase.t similarity index 100% rename from t/demolx/testscripts/K999DeleteTestDatabase.t rename to t/old/demolx/testscripts/K999DeleteTestDatabase.t diff --git a/t/demolx/testscripts/README b/t/old/demolx/testscripts/README similarity index 100% rename from t/demolx/testscripts/README rename to t/old/demolx/testscripts/README diff --git a/t/frontend/README.frontend b/t/old/frontend/README.frontend similarity index 100% rename from t/frontend/README.frontend rename to t/old/frontend/README.frontend diff --git a/t/lx-office.t b/t/old/lx-office.t similarity index 100% rename from t/lx-office.t rename to t/old/lx-office.t diff --git a/t/lxtest.conf.default b/t/old/lxtest.conf.default similarity index 100% rename from t/lxtest.conf.default rename to t/old/lxtest.conf.default diff --git a/t/selenium/AllTests.t b/t/old/selenium/AllTests.t similarity index 100% rename from t/selenium/AllTests.t rename to t/old/selenium/AllTests.t diff --git a/t/selenium/README b/t/old/selenium/README similarity index 100% rename from t/selenium/README rename to t/old/selenium/README diff --git a/t/selenium/TestAccounting.t b/t/old/selenium/TestAccounting.t similarity index 100% rename from t/selenium/TestAccounting.t rename to t/old/selenium/TestAccounting.t diff --git a/t/selenium/TestAdmin.t b/t/old/selenium/TestAdmin.t similarity index 100% rename from t/selenium/TestAdmin.t rename to t/old/selenium/TestAdmin.t diff --git a/t/selenium/TestAllTests.t b/t/old/selenium/TestAllTests.t similarity index 100% rename from t/selenium/TestAllTests.t rename to t/old/selenium/TestAllTests.t diff --git a/t/selenium/TestCreateTestbed.t b/t/old/selenium/TestCreateTestbed.t similarity index 100% rename from t/selenium/TestCreateTestbed.t rename to t/old/selenium/TestCreateTestbed.t diff --git a/t/selenium/TestMasterData.t b/t/old/selenium/TestMasterData.t similarity index 100% rename from t/selenium/TestMasterData.t rename to t/old/selenium/TestMasterData.t diff --git a/t/selenium/TestPayments.t b/t/old/selenium/TestPayments.t similarity index 100% rename from t/selenium/TestPayments.t rename to t/old/selenium/TestPayments.t diff --git a/t/selenium/TestPrinting.t b/t/old/selenium/TestPrinting.t similarity index 100% rename from t/selenium/TestPrinting.t rename to t/old/selenium/TestPrinting.t diff --git a/t/selenium/TestProgramm.t b/t/old/selenium/TestProgramm.t similarity index 100% rename from t/selenium/TestProgramm.t rename to t/old/selenium/TestProgramm.t diff --git a/t/selenium/TestPurchase.t b/t/old/selenium/TestPurchase.t similarity index 100% rename from t/selenium/TestPurchase.t rename to t/old/selenium/TestPurchase.t diff --git a/t/selenium/TestReports.t b/t/old/selenium/TestReports.t similarity index 100% rename from t/selenium/TestReports.t rename to t/old/selenium/TestReports.t diff --git a/t/selenium/TestSelling.t b/t/old/selenium/TestSelling.t similarity index 100% rename from t/selenium/TestSelling.t rename to t/old/selenium/TestSelling.t diff --git a/t/selenium/TestSystem.t b/t/old/selenium/TestSystem.t similarity index 100% rename from t/selenium/TestSystem.t rename to t/old/selenium/TestSystem.t diff --git a/t/selenium/cleanup.pl b/t/old/selenium/cleanup.pl similarity index 100% rename from t/selenium/cleanup.pl rename to t/old/selenium/cleanup.pl diff --git a/t/selenium/incomming/ustva-Inland-linet.html b/t/old/selenium/incomming/ustva-Inland-linet.html similarity index 100% rename from t/selenium/incomming/ustva-Inland-linet.html rename to t/old/selenium/incomming/ustva-Inland-linet.html diff --git a/t/selenium/testscripts/README b/t/old/selenium/testscripts/README similarity index 100% rename from t/selenium/testscripts/README rename to t/old/selenium/testscripts/README diff --git a/t/selenium/testscripts/accounting/begin/A000Login.t b/t/old/selenium/testscripts/accounting/begin/A000Login.t similarity index 100% rename from t/selenium/testscripts/accounting/begin/A000Login.t rename to t/old/selenium/testscripts/accounting/begin/A000Login.t diff --git a/t/selenium/testscripts/accounting/begin/A999Logout.t b/t/old/selenium/testscripts/accounting/begin/A999Logout.t similarity index 100% rename from t/selenium/testscripts/accounting/begin/A999Logout.t rename to t/old/selenium/testscripts/accounting/begin/A999Logout.t diff --git a/t/selenium/testscripts/accounting/end/A000Login.t b/t/old/selenium/testscripts/accounting/end/A000Login.t similarity index 100% rename from t/selenium/testscripts/accounting/end/A000Login.t rename to t/old/selenium/testscripts/accounting/end/A000Login.t diff --git a/t/selenium/testscripts/accounting/end/A999Logout.t b/t/old/selenium/testscripts/accounting/end/A999Logout.t similarity index 100% rename from t/selenium/testscripts/accounting/end/A999Logout.t rename to t/old/selenium/testscripts/accounting/end/A999Logout.t diff --git a/t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t b/t/old/selenium/testscripts/administration/begin/A001CreateTestDatabase.t similarity index 100% rename from t/selenium/testscripts/administration/begin/A001CreateTestDatabase.t rename to t/old/selenium/testscripts/administration/begin/A001CreateTestDatabase.t diff --git a/t/selenium/testscripts/administration/begin/A002CreateTestUser.t b/t/old/selenium/testscripts/administration/begin/A002CreateTestUser.t similarity index 100% rename from t/selenium/testscripts/administration/begin/A002CreateTestUser.t rename to t/old/selenium/testscripts/administration/begin/A002CreateTestUser.t diff --git a/t/selenium/testscripts/administration/begin/A003UpdateDatabase.t b/t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t similarity index 100% rename from t/selenium/testscripts/administration/begin/A003UpdateDatabase.t rename to t/old/selenium/testscripts/administration/begin/A003UpdateDatabase.t diff --git a/t/selenium/testscripts/administration/end/A998DeleteTestUser.t b/t/old/selenium/testscripts/administration/end/A998DeleteTestUser.t similarity index 100% rename from t/selenium/testscripts/administration/end/A998DeleteTestUser.t rename to t/old/selenium/testscripts/administration/end/A998DeleteTestUser.t diff --git a/t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t b/t/old/selenium/testscripts/administration/end/A999DeleteTestDatabase.t similarity index 100% rename from t/selenium/testscripts/administration/end/A999DeleteTestDatabase.t rename to t/old/selenium/testscripts/administration/end/A999DeleteTestDatabase.t diff --git a/t/selenium/testscripts/base/000Login.t b/t/old/selenium/testscripts/base/000Login.t similarity index 100% rename from t/selenium/testscripts/base/000Login.t rename to t/old/selenium/testscripts/base/000Login.t diff --git a/t/selenium/testscripts/base/999Logout.t b/t/old/selenium/testscripts/base/999Logout.t similarity index 100% rename from t/selenium/testscripts/base/999Logout.t rename to t/old/selenium/testscripts/base/999Logout.t diff --git a/t/selenium/testscripts/masterdata/begin/M000Login.t b/t/old/selenium/testscripts/masterdata/begin/M000Login.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M000Login.t rename to t/old/selenium/testscripts/masterdata/begin/M000Login.t diff --git a/t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t b/t/old/selenium/testscripts/masterdata/begin/M001CreateCustomer.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M001CreateCustomer.t rename to t/old/selenium/testscripts/masterdata/begin/M001CreateCustomer.t diff --git a/t/selenium/testscripts/masterdata/begin/M002CreateVendor.t b/t/old/selenium/testscripts/masterdata/begin/M002CreateVendor.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M002CreateVendor.t rename to t/old/selenium/testscripts/masterdata/begin/M002CreateVendor.t diff --git a/t/selenium/testscripts/masterdata/begin/M003CreateGoods.t b/t/old/selenium/testscripts/masterdata/begin/M003CreateGoods.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M003CreateGoods.t rename to t/old/selenium/testscripts/masterdata/begin/M003CreateGoods.t diff --git a/t/selenium/testscripts/masterdata/begin/M004AddService.t b/t/old/selenium/testscripts/masterdata/begin/M004AddService.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M004AddService.t rename to t/old/selenium/testscripts/masterdata/begin/M004AddService.t diff --git a/t/selenium/testscripts/masterdata/begin/M005AddProduct.t b/t/old/selenium/testscripts/masterdata/begin/M005AddProduct.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M005AddProduct.t rename to t/old/selenium/testscripts/masterdata/begin/M005AddProduct.t diff --git a/t/selenium/testscripts/masterdata/begin/M006AddProject.t b/t/old/selenium/testscripts/masterdata/begin/M006AddProject.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M006AddProject.t rename to t/old/selenium/testscripts/masterdata/begin/M006AddProject.t diff --git a/t/selenium/testscripts/masterdata/begin/M999Logout.t b/t/old/selenium/testscripts/masterdata/begin/M999Logout.t similarity index 100% rename from t/selenium/testscripts/masterdata/begin/M999Logout.t rename to t/old/selenium/testscripts/masterdata/begin/M999Logout.t diff --git a/t/selenium/testscripts/masterdata/end/M000Login.t b/t/old/selenium/testscripts/masterdata/end/M000Login.t similarity index 100% rename from t/selenium/testscripts/masterdata/end/M000Login.t rename to t/old/selenium/testscripts/masterdata/end/M000Login.t diff --git a/t/selenium/testscripts/masterdata/end/M995DeleteGoods.t b/t/old/selenium/testscripts/masterdata/end/M995DeleteGoods.t similarity index 100% rename from t/selenium/testscripts/masterdata/end/M995DeleteGoods.t rename to t/old/selenium/testscripts/masterdata/end/M995DeleteGoods.t diff --git a/t/selenium/testscripts/masterdata/end/M996DeleteProject.t b/t/old/selenium/testscripts/masterdata/end/M996DeleteProject.t similarity index 100% rename from t/selenium/testscripts/masterdata/end/M996DeleteProject.t rename to t/old/selenium/testscripts/masterdata/end/M996DeleteProject.t diff --git a/t/selenium/testscripts/masterdata/end/M997DeleteService.t b/t/old/selenium/testscripts/masterdata/end/M997DeleteService.t similarity index 100% rename from t/selenium/testscripts/masterdata/end/M997DeleteService.t rename to t/old/selenium/testscripts/masterdata/end/M997DeleteService.t diff --git a/t/selenium/testscripts/masterdata/end/M998DeleteProduct.t b/t/old/selenium/testscripts/masterdata/end/M998DeleteProduct.t similarity index 100% rename from t/selenium/testscripts/masterdata/end/M998DeleteProduct.t rename to t/old/selenium/testscripts/masterdata/end/M998DeleteProduct.t diff --git a/t/selenium/testscripts/masterdata/end/M999Logout.t b/t/old/selenium/testscripts/masterdata/end/M999Logout.t similarity index 100% rename from t/selenium/testscripts/masterdata/end/M999Logout.t rename to t/old/selenium/testscripts/masterdata/end/M999Logout.t diff --git a/t/selenium/testscripts/payments/begin/P000Login.t b/t/old/selenium/testscripts/payments/begin/P000Login.t similarity index 100% rename from t/selenium/testscripts/payments/begin/P000Login.t rename to t/old/selenium/testscripts/payments/begin/P000Login.t diff --git a/t/selenium/testscripts/payments/begin/P999Logout.t b/t/old/selenium/testscripts/payments/begin/P999Logout.t similarity index 100% rename from t/selenium/testscripts/payments/begin/P999Logout.t rename to t/old/selenium/testscripts/payments/begin/P999Logout.t diff --git a/t/selenium/testscripts/payments/end/P000Login.t b/t/old/selenium/testscripts/payments/end/P000Login.t similarity index 100% rename from t/selenium/testscripts/payments/end/P000Login.t rename to t/old/selenium/testscripts/payments/end/P000Login.t diff --git a/t/selenium/testscripts/payments/end/P999Logout.t b/t/old/selenium/testscripts/payments/end/P999Logout.t similarity index 100% rename from t/selenium/testscripts/payments/end/P999Logout.t rename to t/old/selenium/testscripts/payments/end/P999Logout.t diff --git a/t/selenium/testscripts/printing/begin/P000Login.t b/t/old/selenium/testscripts/printing/begin/P000Login.t similarity index 100% rename from t/selenium/testscripts/printing/begin/P000Login.t rename to t/old/selenium/testscripts/printing/begin/P000Login.t diff --git a/t/selenium/testscripts/printing/begin/P999Logout.t b/t/old/selenium/testscripts/printing/begin/P999Logout.t similarity index 100% rename from t/selenium/testscripts/printing/begin/P999Logout.t rename to t/old/selenium/testscripts/printing/begin/P999Logout.t diff --git a/t/selenium/testscripts/printing/end/P000Login.t b/t/old/selenium/testscripts/printing/end/P000Login.t similarity index 100% rename from t/selenium/testscripts/printing/end/P000Login.t rename to t/old/selenium/testscripts/printing/end/P000Login.t diff --git a/t/selenium/testscripts/printing/end/P999Logout.t b/t/old/selenium/testscripts/printing/end/P999Logout.t similarity index 100% rename from t/selenium/testscripts/printing/end/P999Logout.t rename to t/old/selenium/testscripts/printing/end/P999Logout.t diff --git a/t/selenium/testscripts/programm/begin/P000Login.t b/t/old/selenium/testscripts/programm/begin/P000Login.t similarity index 100% rename from t/selenium/testscripts/programm/begin/P000Login.t rename to t/old/selenium/testscripts/programm/begin/P000Login.t diff --git a/t/selenium/testscripts/programm/begin/P999Logout.t b/t/old/selenium/testscripts/programm/begin/P999Logout.t similarity index 100% rename from t/selenium/testscripts/programm/begin/P999Logout.t rename to t/old/selenium/testscripts/programm/begin/P999Logout.t diff --git a/t/selenium/testscripts/programm/end/P000Login.t b/t/old/selenium/testscripts/programm/end/P000Login.t similarity index 100% rename from t/selenium/testscripts/programm/end/P000Login.t rename to t/old/selenium/testscripts/programm/end/P000Login.t diff --git a/t/selenium/testscripts/programm/end/P999Logout.t b/t/old/selenium/testscripts/programm/end/P999Logout.t similarity index 100% rename from t/selenium/testscripts/programm/end/P999Logout.t rename to t/old/selenium/testscripts/programm/end/P999Logout.t diff --git a/t/selenium/testscripts/purchase/begin/P000Login.t b/t/old/selenium/testscripts/purchase/begin/P000Login.t similarity index 100% rename from t/selenium/testscripts/purchase/begin/P000Login.t rename to t/old/selenium/testscripts/purchase/begin/P000Login.t diff --git a/t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t b/t/old/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t similarity index 100% rename from t/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t rename to t/old/selenium/testscripts/purchase/begin/P001CreateQuoteRequest.t diff --git a/t/selenium/testscripts/purchase/begin/P999Logout.t b/t/old/selenium/testscripts/purchase/begin/P999Logout.t similarity index 100% rename from t/selenium/testscripts/purchase/begin/P999Logout.t rename to t/old/selenium/testscripts/purchase/begin/P999Logout.t diff --git a/t/selenium/testscripts/purchase/end/P000Login.t b/t/old/selenium/testscripts/purchase/end/P000Login.t similarity index 100% rename from t/selenium/testscripts/purchase/end/P000Login.t rename to t/old/selenium/testscripts/purchase/end/P000Login.t diff --git a/t/selenium/testscripts/purchase/end/P999Logout.t b/t/old/selenium/testscripts/purchase/end/P999Logout.t similarity index 100% rename from t/selenium/testscripts/purchase/end/P999Logout.t rename to t/old/selenium/testscripts/purchase/end/P999Logout.t diff --git a/t/selenium/testscripts/reports/begin/R000Login.t b/t/old/selenium/testscripts/reports/begin/R000Login.t similarity index 100% rename from t/selenium/testscripts/reports/begin/R000Login.t rename to t/old/selenium/testscripts/reports/begin/R000Login.t diff --git a/t/selenium/testscripts/reports/begin/R999Logout.t b/t/old/selenium/testscripts/reports/begin/R999Logout.t similarity index 100% rename from t/selenium/testscripts/reports/begin/R999Logout.t rename to t/old/selenium/testscripts/reports/begin/R999Logout.t diff --git a/t/selenium/testscripts/reports/end/R000Login.t b/t/old/selenium/testscripts/reports/end/R000Login.t similarity index 100% rename from t/selenium/testscripts/reports/end/R000Login.t rename to t/old/selenium/testscripts/reports/end/R000Login.t diff --git a/t/selenium/testscripts/reports/end/R999Logout.t b/t/old/selenium/testscripts/reports/end/R999Logout.t similarity index 100% rename from t/selenium/testscripts/reports/end/R999Logout.t rename to t/old/selenium/testscripts/reports/end/R999Logout.t diff --git a/t/selenium/testscripts/selling/begin/S000Login.t b/t/old/selenium/testscripts/selling/begin/S000Login.t similarity index 100% rename from t/selenium/testscripts/selling/begin/S000Login.t rename to t/old/selenium/testscripts/selling/begin/S000Login.t diff --git a/t/selenium/testscripts/selling/begin/S001CreateOffers.t b/t/old/selenium/testscripts/selling/begin/S001CreateOffers.t similarity index 100% rename from t/selenium/testscripts/selling/begin/S001CreateOffers.t rename to t/old/selenium/testscripts/selling/begin/S001CreateOffers.t diff --git a/t/selenium/testscripts/selling/begin/S002CreateCharge.t b/t/old/selenium/testscripts/selling/begin/S002CreateCharge.t similarity index 100% rename from t/selenium/testscripts/selling/begin/S002CreateCharge.t rename to t/old/selenium/testscripts/selling/begin/S002CreateCharge.t diff --git a/t/selenium/testscripts/selling/begin/S003CreateInvoice.t b/t/old/selenium/testscripts/selling/begin/S003CreateInvoice.t similarity index 100% rename from t/selenium/testscripts/selling/begin/S003CreateInvoice.t rename to t/old/selenium/testscripts/selling/begin/S003CreateInvoice.t diff --git a/t/selenium/testscripts/selling/begin/S999Logout.t b/t/old/selenium/testscripts/selling/begin/S999Logout.t similarity index 100% rename from t/selenium/testscripts/selling/begin/S999Logout.t rename to t/old/selenium/testscripts/selling/begin/S999Logout.t diff --git a/t/selenium/testscripts/selling/end/S000Login.t b/t/old/selenium/testscripts/selling/end/S000Login.t similarity index 100% rename from t/selenium/testscripts/selling/end/S000Login.t rename to t/old/selenium/testscripts/selling/end/S000Login.t diff --git a/t/selenium/testscripts/selling/end/S999Logout.t b/t/old/selenium/testscripts/selling/end/S999Logout.t similarity index 100% rename from t/selenium/testscripts/selling/end/S999Logout.t rename to t/old/selenium/testscripts/selling/end/S999Logout.t diff --git a/t/selenium/testscripts/system/begin/S000Login.t b/t/old/selenium/testscripts/system/begin/S000Login.t similarity index 100% rename from t/selenium/testscripts/system/begin/S000Login.t rename to t/old/selenium/testscripts/system/begin/S000Login.t diff --git a/t/selenium/testscripts/system/begin/S001CreateProductGroups.t b/t/old/selenium/testscripts/system/begin/S001CreateProductGroups.t similarity index 100% rename from t/selenium/testscripts/system/begin/S001CreateProductGroups.t rename to t/old/selenium/testscripts/system/begin/S001CreateProductGroups.t diff --git a/t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t b/t/old/selenium/testscripts/system/begin/S002CreatePriceBrackets.t similarity index 100% rename from t/selenium/testscripts/system/begin/S002CreatePriceBrackets.t rename to t/old/selenium/testscripts/system/begin/S002CreatePriceBrackets.t diff --git a/t/selenium/testscripts/system/begin/S003AddLanguage.t b/t/old/selenium/testscripts/system/begin/S003AddLanguage.t similarity index 100% rename from t/selenium/testscripts/system/begin/S003AddLanguage.t rename to t/old/selenium/testscripts/system/begin/S003AddLanguage.t diff --git a/t/selenium/testscripts/system/begin/S004ShowLanguages.t b/t/old/selenium/testscripts/system/begin/S004ShowLanguages.t similarity index 100% rename from t/selenium/testscripts/system/begin/S004ShowLanguages.t rename to t/old/selenium/testscripts/system/begin/S004ShowLanguages.t diff --git a/t/selenium/testscripts/system/begin/S005AddPaymentConditions.t b/t/old/selenium/testscripts/system/begin/S005AddPaymentConditions.t similarity index 100% rename from t/selenium/testscripts/system/begin/S005AddPaymentConditions.t rename to t/old/selenium/testscripts/system/begin/S005AddPaymentConditions.t diff --git a/t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t b/t/old/selenium/testscripts/system/begin/S006ShowPaymentConditions.t similarity index 100% rename from t/selenium/testscripts/system/begin/S006ShowPaymentConditions.t rename to t/old/selenium/testscripts/system/begin/S006ShowPaymentConditions.t diff --git a/t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t b/t/old/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t similarity index 100% rename from t/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t rename to t/old/selenium/testscripts/system/begin/S007AddCustomerVendorTypes.t diff --git a/t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t b/t/old/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t similarity index 100% rename from t/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t rename to t/old/selenium/testscripts/system/begin/S008ShowCustomerVendorTypes.t diff --git a/t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t b/t/old/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t similarity index 100% rename from t/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t rename to t/old/selenium/testscripts/system/begin/S009AddShowDeleteMeasure.t diff --git a/t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t b/t/old/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t similarity index 100% rename from t/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t rename to t/old/selenium/testscripts/system/begin/S010AddShowDeleteServiceMeasure.t diff --git a/t/selenium/testscripts/system/begin/S011CreateAccount.t b/t/old/selenium/testscripts/system/begin/S011CreateAccount.t similarity index 100% rename from t/selenium/testscripts/system/begin/S011CreateAccount.t rename to t/old/selenium/testscripts/system/begin/S011CreateAccount.t diff --git a/t/selenium/testscripts/system/begin/S012ShowAccount.t b/t/old/selenium/testscripts/system/begin/S012ShowAccount.t similarity index 100% rename from t/selenium/testscripts/system/begin/S012ShowAccount.t rename to t/old/selenium/testscripts/system/begin/S012ShowAccount.t diff --git a/t/selenium/testscripts/system/begin/S013TestAccount.t b/t/old/selenium/testscripts/system/begin/S013TestAccount.t similarity index 100% rename from t/selenium/testscripts/system/begin/S013TestAccount.t rename to t/old/selenium/testscripts/system/begin/S013TestAccount.t diff --git a/t/selenium/testscripts/system/begin/S999Logout.t b/t/old/selenium/testscripts/system/begin/S999Logout.t similarity index 100% rename from t/selenium/testscripts/system/begin/S999Logout.t rename to t/old/selenium/testscripts/system/begin/S999Logout.t diff --git a/t/selenium/testscripts/system/end/S000Login.t b/t/old/selenium/testscripts/system/end/S000Login.t similarity index 100% rename from t/selenium/testscripts/system/end/S000Login.t rename to t/old/selenium/testscripts/system/end/S000Login.t diff --git a/t/selenium/testscripts/system/end/S992DeleteProductGroups.t b/t/old/selenium/testscripts/system/end/S992DeleteProductGroups.t similarity index 100% rename from t/selenium/testscripts/system/end/S992DeleteProductGroups.t rename to t/old/selenium/testscripts/system/end/S992DeleteProductGroups.t diff --git a/t/selenium/testscripts/system/end/S994DeleteAccount.t b/t/old/selenium/testscripts/system/end/S994DeleteAccount.t similarity index 100% rename from t/selenium/testscripts/system/end/S994DeleteAccount.t rename to t/old/selenium/testscripts/system/end/S994DeleteAccount.t diff --git a/t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t b/t/old/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t similarity index 100% rename from t/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t rename to t/old/selenium/testscripts/system/end/S995DeleteCustomerVendorTypes.t diff --git a/t/selenium/testscripts/system/end/S996DeletePaymentConditions.t b/t/old/selenium/testscripts/system/end/S996DeletePaymentConditions.t similarity index 100% rename from t/selenium/testscripts/system/end/S996DeletePaymentConditions.t rename to t/old/selenium/testscripts/system/end/S996DeletePaymentConditions.t diff --git a/t/selenium/testscripts/system/end/S997DeleteLanguages.t b/t/old/selenium/testscripts/system/end/S997DeleteLanguages.t similarity index 100% rename from t/selenium/testscripts/system/end/S997DeleteLanguages.t rename to t/old/selenium/testscripts/system/end/S997DeleteLanguages.t diff --git a/t/selenium/testscripts/system/end/S998DeletePriceBrackets.t b/t/old/selenium/testscripts/system/end/S998DeletePriceBrackets.t similarity index 100% rename from t/selenium/testscripts/system/end/S998DeletePriceBrackets.t rename to t/old/selenium/testscripts/system/end/S998DeletePriceBrackets.t diff --git a/t/selenium/testscripts/system/end/S999Logout.t b/t/old/selenium/testscripts/system/end/S999Logout.t similarity index 100% rename from t/selenium/testscripts/system/end/S999Logout.t rename to t/old/selenium/testscripts/system/end/S999Logout.t diff --git a/t/test.sh b/t/test.sh new file mode 100755 index 000000000..53a737095 --- /dev/null +++ b/t/test.sh @@ -0,0 +1 @@ +perl -MExtUtils::Command::MM -e 'test_harness(0)' t/*.t -- 2.20.1