You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
995 B
43 lines
995 B
<?
|
|
// testing the recompilation
|
|
// bug found by Sébastien Lion
|
|
$_GET['test']=1;
|
|
include(dirname(__FILE__).'/../bibtexbrowser.php');
|
|
|
|
$a = tempnam('/tmp','').".bib";
|
|
$b = tempnam('/tmp','').".bib";
|
|
|
|
file_put_contents($a, "@misc{f,title=foo}");
|
|
file_put_contents($b, "@misc{g,title=bar}");
|
|
|
|
sleep(2);
|
|
|
|
$_GET['bib']=$a.";".$b;
|
|
|
|
function boolString($bValue = false) { // returns string
|
|
return ($bValue ? 'true' : 'false');
|
|
}
|
|
|
|
$result = '';
|
|
$result .= 'should be true:'.boolString(setDB())."\n";
|
|
$result .= 'should be false:'.boolString(setDB())."\n";
|
|
$result .= 'should be false:'.boolString(setDB())."\n";
|
|
|
|
touch($a);
|
|
sleep(2);
|
|
$result .= 'should be true:'.boolString(setDB())."\n";
|
|
$result .= 'should be false:'.boolString(setDB())."\n";
|
|
|
|
touch($b);
|
|
sleep(2);
|
|
$result .= 'should be true:'.boolString(setDB())."\n";
|
|
$result .= 'should be false:'.boolString(setDB())."\n";
|
|
|
|
echo $result;
|
|
file_put_contents('output/04_setDB.txt',$result);
|
|
|
|
// clean
|
|
unlink($a);
|
|
unlink($b);
|
|
|
|
?>
|