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() {