improve error message (fix #79)

This commit is contained in:
Martin Monperrus
2017-12-17 08:51:42 +01:00
parent d14042b81b
commit 1bc1441a01
+5 -1
View File
@@ -35,6 +35,9 @@ define('BIBTEXBROWSER_MAIN','Nothing');
//require_once('bibtexbrowser.php');
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');
$nsnippet=0;
foreach(getAllSnippetsInFile('bibtexbrowser.php') as $snippet) {
@@ -68,7 +71,8 @@ class BTBTest extends PHPUnit_Framework_TestCase {
function test_checkdoc() {
if(!is_file('gakowiki-syntax.php')) { return; }
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() {