Commit Graph

46 Commits

Author SHA1 Message Date
Alex Schroeder
655c2ab510 Executable flag is only useful when shebang is specified 2014-09-03 14:23:20 +03:00
Alex Schroeder
dad3dc1d0f test.pl: extract config file writing
Move the writing of the config file (and the resetting of the important
variables) into a separate file so that tests can reset the config file
without clearing all the pages.
2014-07-31 13:17:02 +02:00
Alex Schroeder
097476f506 Get rid of one letter sub-directories.
Recent GNU/Linux systems use ext3 or ext4 file systems. These use HTree
to index files. Wikipedia says: "HTree indexing improved the scalability
of Linux ext2 based filesystems from a practical limit of a few thousand
files, into the range of tens of millions of files per directory. [...]
HTree indexes are available in ext3 when the dir_index feature is
enabled. [...] HTree indexes are turned on by default in ext4."

Thus, instead of working on balanced-page-directories.pl, we decided to
get rid of these sub-directories altogether.

Unfortunately, this is backwards incompatible. Users wanting to upgrade
will need to install the upgrade.pl extension in order to upgrade the
file database.
2014-06-06 17:32:44 +02:00
Alex Schroeder
d24c69c08d Fixing the UTF-8 encoding issues for static export 2014-03-18 11:49:28 +01:00
Alex Schroeder
15570afe4b More tests regarding local links in static exports 2014-03-18 10:32:22 +01:00
Alex Schroeder
e946a8ba6c Revert the last commit.
The output has to be encoded as well.
2014-01-25 18:16:06 +01:00
Alex Schroeder
611ed8588d Fix newline handling. 2014-01-24 23:19:37 +01:00
Alex Schroeder
a87b0056e3 Use $PERLBREW_PATH if available.
Try to guess which Perl we should be using. Since we loaded wiki.pl,
our $ENV{PATH} is set to /bin:/usr/bin in order to find diff and grep.
Prepending /usr/local/bin is one option, using $PERLBREW_PATH is
another.
2013-08-21 10:41:51 +02:00
Alex Schroeder
275376006e Fix encoding issues with the use of DB_File in mail.pl.
This also fixes the tests. Also get rid of wide character in print by
Test::Builder by adding the fix mentioned in the Test::More manpage.

The DB_File issue was necessary because a page name with an EN DASH
caused the script to crash, thus not printing the footer.
Unfortunately, this is solved by URL-encoding keys and values. This
means that your old mail.db is going to be invalid!
2013-01-12 23:55:08 +01:00
Alex Schroeder
245aa32bc5 clear_page unsets @IndexList
Without this, running t/tags.t will alternate between running ok and
producing an error: "Cannot open test-data/page/I/InterMap.pg: No such
file or directory"
2012-08-05 02:28:39 +02:00
Alex Schroeder
92da7063e9 Fixed UTF-8 support in various automated tests.
Issues:

- the Mac layer was masking issues because of the NFC/NFD difference and existing compatiblity hacks in mac.pl
- drafts.pl was suffering from a double encoding issue
- crossbar.t and download.t tests were failing because I had recently fixed DoDownload output to be raw instead of encoded
- test.pl now has a way to capture the raw, unencoded output produced by DoDownload
- tags.t got some tests to prove that recent changes to wiki.pl actually work
2012-07-30 23:30:27 +02:00
Alex Schroeder
2c6428e652 On some encoding problems
The TOC extension causes problems when including non-ASCII Text.
2012-07-04 21:36:56 +02:00
Alex Schroeder
e533bc3915 Fix an encoding error in namespaces.pl on Debian
The Debian installation uses ext3 and therefore raw bytes for
filenames unlike the HFS filesystem of Mac OSX.

Copyright years were updated. The maintenance output of for drafts was
cleaned up.
2012-05-25 01:00:10 +02:00
Alex Schroeder
1495a29fd3 More UTF-8 fixes
All the source files containing non-ASCII characters needed to have
utf8 added. This will be necessary for user config files as well! The
regular expressions identifying page names had to be changed.
UrlEncode translates the string back to bytes before encoding it.
Cached RSS files are saved with UTF-8 encoding and therefore need
their meta-data changed (using the XML::RSS module to do this
correctly didn't work for some of the test files). The CGI object's
parameters, keywords and info_path are decoded correctly. File access
uses the UTF-8 layer (reading, writing, appending, access to the log
of recent changes, running sub processes with grep and diff).

The mac compatibility extension will also disable the use of grep if
non-ASCII characters are searched for because of an unexplained
problem with grep.
2012-05-24 18:08:42 +02:00
Alex Schroeder
2d6b2d6a71 Remove $HttpCharset and moved everything to UTF-8
This also required some changes to the tests where explicit UTF-8
encoding had been used in the past.
2012-05-22 11:50:23 +02:00
Alex Schroeder
a19e14f522 Revert last change. 2010-11-07 02:03:15 +00:00
Alex Schroeder
3f13a8b147 (update_page): Make sure we don't add an url-encoded pagename to the
IndexHash.
2010-11-06 16:19:19 +00:00
Alex Schroeder
90951f4287 *** empty log message *** 2009-08-31 08:33:12 +00:00
Alex Schroeder
8f86e5b09f (clear_pages, add_module): Add code to make it work on
Windows with Cygwin.
2008-12-17 12:36:52 +00:00
Alex Schroeder
9359a4d4fc (xpath_do): Strip XML preprocessing instruction and
call the XML parser if the HTML parser fails. Now we can write
XPath tests on XML documents.
2008-10-12 21:21:12 +00:00
Alex Schroeder
f8a2ba914c (name): Show the last 60 characters of a XPath test
instead of the first 60 as this makes them easier to find.
2008-10-04 11:10:18 +00:00
Alex Schroeder
30df9cd1e4 (xpath_do): No longer strip the HTML element in order
to allow tests for meta data.
2008-06-13 14:41:13 +00:00
Alex Schroeder
dbf356a795 Get rid of $resultfile. 2008-06-11 11:03:21 +00:00
Alex Schroeder
a67ed779e1 Switch from /tmp/oddmuse to $DataDir. 2008-05-26 22:58:39 +00:00
Alex Schroeder
675ab98ad4 Revert change to $DataDir. 2008-03-08 00:41:51 +00:00
Alex Schroeder
dc77788470 Set $DataDir and $ENV{WikiDataDir} to '/tmp/oddmuse'. 2008-03-08 00:17:54 +00:00
Alex Schroeder
23237bea0b (xpath_do): Don't be confused by the new xmlns
attribute in the html element.
2007-11-13 20:21:10 +00:00
Alex Schroeder
40557161af (xpath_do): Only print the page once per test run. 2007-10-10 14:37:04 +00:00
Alex Schroeder
105b59fbf3 (update_page): Pass $rest to the output command as
well, because of the ns parameter when testing namespaces.
2006-12-22 15:38:06 +00:00
Alex Schroeder
4a26326294 Check $redirect instead of $output for Status 302! 2006-10-10 01:37:01 +00:00
Alex Schroeder
cbd8575f09 (update_page): Add $id to the hash only if there was no error creating
or updating the page.
2006-10-10 01:28:17 +00:00
Alex Schroeder
891bb4bb67 Convert to Unix EOL.
Fix the reinitialization after the creation of InterMap pages.
2006-10-10 01:17:23 +00:00
Alex Schroeder
ea7c25b0ff (test_page_negative, xpath_do): Print a "not" prefix
for negative tests.
2006-10-06 12:13:18 +00:00
Alex Schroeder
6f5a2f1717 (update_page): Add quotes around the arguments. 2006-09-20 22:44:56 +00:00
Alex Schroeder
1eb2ba9aa3 Added license. 2006-09-20 00:11:31 +00:00
Alex Schroeder
c50ad67e55 Make $redirect public. 2006-09-19 18:27:20 +00:00
Alex Schroeder
f45112c390 (get_text_via_xpath): Replaced with xpath_test. 2006-09-19 16:07:39 +00:00
Alex Schroeder
a392e20898 Moved some things around. Added newlines() so that my map s/// @_
didn't try to modify constants.
2006-09-19 15:00:18 +00:00
Alex Schroeder
10263b1029 (xpath_do, xpath_test, negative_xpath_test): Move the common stuff
in both tests into a third sub.
2006-09-19 14:19:57 +00:00
Alex Schroeder
be5b20d432 (test_page_negative): Use name() for the test name. 2006-09-19 13:14:36 +00:00
Alex Schroeder
4ae75d7a76 (test_page): Use name() for the test name. 2006-09-19 13:11:55 +00:00
Alex Schroeder
940f8af8a8 (xpath_run_tests, run_tests): Run tests in order. 2006-09-19 11:27:36 +00:00
Alex Schroeder
93477b79b8 skip() 2006-09-19 10:18:06 +00:00
Alex Schroeder
675ad816cf Fixed more subs to work in t. 2006-09-19 00:04:23 +00:00
Alex Schroeder
4a4c6e6ca4 adapted to default-markup.t 2006-09-18 21:14:01 +00:00
Alex Schroeder
e1a5d27f19 new test suite for atom with some subs from the original ../test.pl 2006-09-18 00:06:31 +00:00