From 1bc1441a013695b9f02a8bf1ef53c00036e642c8 Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Sun, 17 Dec 2017 08:48:11 +0100 Subject: [PATCH] improve error message (fix #79) --- bibtexbrowser-test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bibtexbrowser-test.php b/bibtexbrowser-test.php index ce10a2a..240a27b 100755 --- a/bibtexbrowser-test.php +++ b/bibtexbrowser-test.php @@ -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() {