improve error message (fix #79)
This commit is contained in:
@@ -35,6 +35,9 @@ define('BIBTEXBROWSER_MAIN','Nothing');
|
|||||||
//require_once('bibtexbrowser.php');
|
//require_once('bibtexbrowser.php');
|
||||||
|
|
||||||
set_error_handler("exception_error_handler");
|
set_error_handler("exception_error_handler");
|
||||||
|
if (!is_file('reflectivedoc.php')) {
|
||||||
|
die("to run the bibtexbrowser tests, download this file first:\ncurl -L -o reflectivedoc.php https://www.monperrus.net/martin/reflectivedoc.php.txt\n");
|
||||||
|
}
|
||||||
require('reflectivedoc.php');
|
require('reflectivedoc.php');
|
||||||
$nsnippet=0;
|
$nsnippet=0;
|
||||||
foreach(getAllSnippetsInFile('bibtexbrowser.php') as $snippet) {
|
foreach(getAllSnippetsInFile('bibtexbrowser.php') as $snippet) {
|
||||||
@@ -68,7 +71,8 @@ class BTBTest extends PHPUnit_Framework_TestCase {
|
|||||||
function test_checkdoc() {
|
function test_checkdoc() {
|
||||||
if(!is_file('gakowiki-syntax.php')) { return; }
|
if(!is_file('gakowiki-syntax.php')) { return; }
|
||||||
if (!function_exists('gk_wiki2html')) { include('gakowiki-syntax.php'); }
|
if (!function_exists('gk_wiki2html')) { include('gakowiki-syntax.php'); }
|
||||||
create_wiki_parser()->parse(file_get_contents('bibtexbrowser-documentation.wiki'));
|
$result = create_wiki_parser()->parse(file_get_contents('bibtexbrowser-documentation.wiki'));
|
||||||
|
$this->assertEquals(1, strpos($result,"bibtexbrowser is a PHP script that creates publication lists from Bibtex files"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDB() {
|
function createDB() {
|
||||||
|
|||||||
Reference in New Issue
Block a user