Commit graph

167 commits

Author SHA1 Message Date
Anika Henke
d98986013f added test case for non-breaking spaces in headlines and pagenames (to accompany FS#2291) 2011-10-15 16:00:46 +01:00
Andreas Gohr
7ae6f87a6c Fixed test and broken salt generation in PassHash class
Turned out a test wasn't really testing what it should have been testing
and thus did hide a bug. Still puzzles me why it still worked some
times.
This patch also sets the default iteration count for bmd5 and pmd5 to 8.
2011-10-14 16:05:57 +02:00
Andreas Gohr
475f2b8d83 added a test case to check for FS#2349
no problems found
2011-10-14 13:42:11 +02:00
Andreas Gohr
b680ea06a6 fix namespace cleaning FS#2295
This patch applies the correct pagename cleaning to namespaces as well.
Namespaces should follow the same rules as pagenames but due to a bug it
was possible to have namespaces ending in a underscore.

If you used such a namespace it will be inaccessible after applying this
patch. You should rename the namespace directory on the filesystem
(removing the trailing underscore). You old links will then work
automatically again. Rebuilding the search index is recommended.
2011-09-25 09:54:17 +02:00
Adrian Lang
3bb3c663cb Add jslint wrapper script 2011-09-13 12:18:39 +02:00
Adrian Lang
aea34b5fe4 Add testcases for search_index 2011-09-04 15:36:38 +02:00
Andreas Gohr
6992ea0842 fixed JavaScript compressor for certain regexes
This fixes a problem with running the minified jQuery through the
compressor.
2011-06-05 13:15:56 +02:00
Adrian Lang
1c57662f5f Prevent fatal error in test cases when no auth backend is configured 2011-05-25 15:32:20 +02:00
Adrian Lang
9bd9209784 Fix HTML in DifferenceEngine tests 2011-04-21 17:29:01 +02:00
Adrian Lang
45a0fa152b Support the empty link [[]] 2011-04-14 08:37:19 +02:00
Adrian Lang
0c28bbb662 Fix page ID test cases & make them more robust 2011-04-09 13:30:34 +02:00
Izidor Matušov
fda14ffc7c Check if link exists and set right caption 2011-04-08 00:36:11 +02:00
Izidor Matušov
38574c3529 Added configuration variables for empty link testcases and added testcases for resolve_pageid 2011-04-07 18:00:12 +02:00
Izidor Matušov
4ab823396c Unit test cases for FS 2178 2011-04-07 18:00:12 +02:00
Christopher Smith
efb973f8a3 Merge branch 'master' of git@github.com:splitbrain/dokuwiki 2011-04-02 03:36:26 +01:00
Christopher Smith
344763ad4e FS#2122 alter SafeFN safe and post indicator characters.
Note, any filenames encoded with the previous SafeFN scheme will need to
be converted to the new scheme.  Users of the old SafeFN scheme should
not use this new scheme until after converting their filenames.
2011-04-02 03:32:13 +01:00
Michael Hamann
4a39d80348 Fix test cases so they work with e7f59597d0
All linebreaks before p_close have been removed.
2011-02-09 12:32:13 +01:00
Adrian Lang
4f2305cb14 Fix whitespace handling in inline diff (closes FS#2161) 2011-02-06 16:49:52 +01:00
Andreas Gohr
45763179f1 fixed email test case since we allow local addresses 2011-02-06 13:25:15 +01:00
Andreas Gohr
a18f9d4ad8 Accept IPv6 addresses in email addresses 2011-02-06 13:21:08 +01:00
Michael Hamann
0e5fde485b Allow p_set_metadata during rendering, test cases included. FS#1827 2011-02-06 13:12:54 +01:00
Andreas Gohr
9d5980233d fixed the IPv6 tests, bracket links are parsed by InternalLinks 2011-02-06 11:21:02 +01:00
Andreas Gohr
89643a151e added a bunch of IPv6 test cases FS#2137 2011-02-06 11:10:37 +01:00
Andreas Gohr
62bbd5ef5f use a bigger range of characters for password salts 2011-01-23 11:15:33 +01:00
Andreas Gohr
52c9860c6e django pass hashes have no leading $ 2011-01-23 10:55:23 +01:00
Andreas Gohr
3a0a2d0563 refactored passowrd hashing functions to a class
this splits the long auth_cryptPassword() function into many member
functions of a new class PassHash which should make it more
maintainable and reusable for other projects.

This also adds two new methods djangomd5 and djangosha1 as used by the
popular python framework Django.

Maybe the auth_cryptPassword() and auth_verifyPassword() functions
should be deprecated in favor of using the class directly?
2011-01-22 22:03:54 +01:00
Michael Hamann
204b27c8e0 Fix getBaseURL for literal IPv6 addresses in URLs (RFC 2732) + test case 2011-01-16 22:43:34 +01:00
Andreas Gohr
f91977c212 Added support for Wordpress' password hashing FS#2134 2011-01-15 12:24:14 +01:00
Andreas Gohr
ef7df687e4 added unit test for kmd5 password hashing 2011-01-15 11:28:59 +01:00
Michael Hamann
6e0b4b6744 Fixed css_loadfile and removed unneeded complexity, added testcases 2011-01-09 14:52:50 +01:00
Anika Henke
be96545ccf removed obsolete references to 'JSnocheck' class 2011-01-03 15:47:06 +00:00
Adrian Lang
4f56ecbf92 Fix handling of case in auth_isMember; add and fix test cases 2010-12-21 13:20:10 +01:00
Andreas Gohr
d6dc956f8c added auth_isMember()
This function abstracts checking a given user and her groups against a
given member list (as used in the superuser and manager options).

It is also used in auth_isManager() and auth_isAdmin(), unlike the
previous function, this one skips the nameencode step as it should be
unnessary here (all input is given decoded).

The test cases where extended by some non-ID user and group names.

People with non-plain auth backends should check that their
administrator and manager setups still work as expected
2010-12-08 23:41:59 +01:00
Michael Hamann
e3776c06c3 Remove enc=utf-8 in VIM modeline as it is not allowed in VIM 7.3
As of VIM 7.3 it is no longer possible to specify the encoding in the
modeline. This gives an error message whenever such a file is opened,
thus this commit removes the enc setting from the modeline.
2010-11-29 16:19:49 +01:00
Adrian Lang
8bddd94ea8 Fix SafeFN-encoded file names
SafeFN encoding now always end the encoding block by appending a dot at the end of the file name. This is necessary since the file name may get an extension which is not encoded.
2010-10-26 22:10:23 +02:00
Adrian Lang
37c1acbded Correctly handle non-default sepchars in page templates (FS#2057) 2010-10-11 11:27:23 +02:00
Andreas Gohr
c1e6807d80 removed outdated timing tests 2010-10-03 13:21:15 +02:00
Andreas Gohr
cf1b22acfe reset failinfo on next test case 2010-10-03 13:13:24 +02:00
Guy Brand
80c36a2739 fixed new calls in test cases according to PHP5 conventions 2010-09-23 08:41:38 +02:00
Adrian Lang
e383b00455 Remove odd .htaccess
Neither I nor Andi has any idea what this file is for and why it explicitly //grants// permission and why its documentation is wrong.
2010-09-20 13:32:32 +02:00
Adrian Lang
105e67b2d5 More emphasis test cases from bug reports 2010-08-31 10:38:00 +02:00
Adrian Lang
30552951dd Fix table tests according to 6606d6fc9f 2010-08-31 10:38:00 +02:00
Andreas Gohr
8a52cdf35a XML-RPC fix for untyped string values FS#1993
includes unit tests. Extensions welcome.
2010-07-01 19:44:41 +02:00
Andreas Gohr
5ab78106b0 Make XMLRPC date parsing more flexible FS#1966
Since the specs aren't 100% clear, dates might be passed in different
formats by various XMLRPC clients. This patch makes date parsing a bit
more flexible.

Unit tests included.
2010-06-09 21:43:10 +02:00
Christopher Smith
c5c9e5ff85 SafeFN test cases 2010-04-04 22:26:50 +01:00
Michael Klier
08d7babffe added support for plugin unittests
This patch adds support to include plugin tests in the
	DokuWiki testsuite. Plugin tests are located in a dedicated
	directory _test/within a plugin directory. The naming
	convention of the test files follows the one used in
	DokuWikis testsuite.

		<plugin>/_test/*.test.php 	-> single test
		<plugin>/_test/*.group.php  -> group test

	The plugin tests are accessible via the web interface
	of the test suite and via the cli interface. It is recommend
	to bundle plugin test in a plugin group test. The webinterface
	also allows to run all plugin tests at once.

	Test files must include:

		<dokuwiki>/_test/lib/unittest.php

	Example Test:

	require_once(DOKU_INC.'_test/lib/unittest.php');
	class plugin_test extends Doku_UnitTestCase {
		function test() {
			$this->assertEqual(1,1);
		}
	}

	Example Group Test:

	require_once(DOKU_INC.'_test/lib/unittest.php');
	class plugin_group_test extends Doku_GroupTest {
		function group_test() {
			$dir = dirname(__FILE__).'/';
			$this->GroupTest('plugin_grouptest');
			$this->addTestFile($dir . 'plugin.test1.php');
			$this->addTestFile($dir . 'plugin.test2.php');
			$this->addTestFile($dir . 'plugin.test3.php');
		}
	}

	At the moment unittest.php contains only two
	meta classes so plugins tests don't have to inherit
	from the simpletest classes.

	This patch should be treated as intermediate step to
	allow for plugin tests. The testsuite wasn't designed
	to include plugin tests. It should probably be refactored
	at a later point.
2010-03-30 11:15:08 +02:00
YoBoY
229529655f Limiting use of readdir in the idx_indexLengths function (v2).
Each searches on the wiki use this function. Scanning the index directory eachtime is time consuming with a constant series of disk access.
Switching a normal search to use file_exists 1 or more times, and not readdir all the directory.
Switching a wildcard search to use a lengths.idx file containing all the word lengths used in the wiki, file generated if a new configuration parameter $conf[readdircache] is not 0 and fixed to a time in second. Creation of a new function idx_listIndexLengths to do this part.
2010-03-24 21:27:23 +01:00
Adrian Lang
b0ffdb5e96 Make tests PHP 5.3 compatible 2010-03-23 15:27:31 +01:00
Michael Hamann
83e9d7a593 New testcase for getID() with data from FS#1838 2010-03-02 20:08:58 +01:00
Michael Hamann
06368e4dbb Fixed testcase and getID - FS#1908 FS#1831 FS#1838
$_SERVER['PATH_INFO'] is used now to determine the page id when using
internal rewriting, in all testcases I've seen so far this variable
was set correctly. There are also a couple of fallbacks if the variable
doesn't exist, $_SERVER['SCRIPT_NAME'] is now preferred instead of
custom path extraction which fails when doku.php is outside the document
root.
2010-03-02 20:08:58 +01:00