Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of http://github.com/splitbrain/dokuwiki
- Loading branch information
Showing
62 changed files
with
4,802 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
/conf/words.aspell | ||
/conf/lang/* | ||
/conf/plugin_lang/* | ||
/conf/plugins.local.* | ||
.htaccess | ||
*.swp | ||
*.bak | ||
|
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
require_once DOKU_INC.'inc/search.php'; | ||
|
||
class search_test extends UnitTestCase { | ||
function strip_index_data($entry) { | ||
$n_entry = array(); | ||
foreach(array('id', 'type', 'level', 'open') as $k) { | ||
$n_entry[$k] = $entry[$k]; | ||
} | ||
return $n_entry; | ||
} | ||
|
||
function test_search_index(){ | ||
$data = array(); | ||
search($data, dirname(__FILE__) . '/data', 'search_index', | ||
array('ns' => 'ns2')); | ||
$this->assertEqual(array_map(array($this, 'strip_index_data'), $data), | ||
array( | ||
array( | ||
'id' => 'ns1', | ||
'type' => 'd', | ||
'level' => 1, | ||
'open' => false | ||
), array( | ||
'id' => 'ns2', | ||
'type' => 'd', | ||
'level' => 1, | ||
'open' => true | ||
), array( | ||
'id' => 'ns2:page1', | ||
'type' => 'f', | ||
'level' => 2, | ||
'open' => true, | ||
), )); | ||
$data = array(); | ||
search($data, dirname(__FILE__) . '/data', 'search_index', | ||
array('ns' => 'ns1/ns3')); | ||
$this->assertEqual(array_map(array($this, 'strip_index_data'), $data), | ||
array( | ||
array( | ||
'id' => 'ns1', | ||
'type' => 'd', | ||
'level' => 1, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns1:ns3', | ||
'type' => 'd', | ||
'level' => 2, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns1:ns3:page3', | ||
'type' => 'f', | ||
'level' => 3, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns1:page1', | ||
'type' => 'f', | ||
'level' => 2, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns1:page2', | ||
'type' => 'f', | ||
'level' => 2, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns2', | ||
'type' => 'd', | ||
'level' => 1, | ||
'open' => false, | ||
), )); | ||
$data = array(); | ||
search($data, dirname(__FILE__) . '/data', 'search_index', | ||
array('ns' => 'ns1/ns3', 'nofiles' => true)); | ||
$this->assertEqual(array_map(array($this, 'strip_index_data'), $data), | ||
array( | ||
array( | ||
'id' => 'ns1', | ||
'type' => 'd', | ||
'level' => 1, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns1:ns3', | ||
'type' => 'd', | ||
'level' => 2, | ||
'open' => true, | ||
), | ||
array( | ||
'id' => 'ns2', | ||
'type' => 'd', | ||
'level' => 1, | ||
'open' => false, | ||
), )); | ||
|
||
} | ||
} | ||
//Setup VIM: ex: et ts=4 : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
/** | ||
* This file configures the enabled/disabled status of plugins, which are also protected | ||
* from changes by the extention manager. These settings will override any local settings. | ||
* It is not recommended to change this file, as it is overwritten on DokuWiki upgrades. | ||
*/ | ||
$plugins['acl'] = 1; | ||
$plugins['plugin'] = 1; | ||
$plugins['config'] = 1; | ||
$plugins['usermanager'] = 1; | ||
$plugins['revert'] = 1; |
Empty file.
Empty file.
Oops, something went wrong.