|
|
@ -6,20 +6,24 @@ then a bzr diff is the regression test |
|
|
|
|
|
|
|
*/ |
|
|
|
$_GET['test']=1; |
|
|
|
include('../bibtexbrowser.php'); |
|
|
|
include(dirname(__FILE__).'/../bibtexbrowser.php'); |
|
|
|
|
|
|
|
$testbibs = array ( |
|
|
|
'bibacid-iso8859.bib', |
|
|
|
'all.bib', |
|
|
|
'metrics.bib', |
|
|
|
'strings.bib;entries.bib' |
|
|
|
dirname(__FILE__).'/input/bibacid-iso8859.bib', |
|
|
|
dirname(__FILE__).'/input/all.bib', |
|
|
|
dirname(__FILE__).'/input/metrics.bib', |
|
|
|
dirname(__FILE__).'/input/strings.bib;'.dirname(__FILE__).'/input/entries.bib' |
|
|
|
); |
|
|
|
|
|
|
|
foreach ($testbibs as $k) { |
|
|
|
echo $k."\n"; |
|
|
|
$db = new BibDataBase(); |
|
|
|
$output = array(); |
|
|
|
foreach(explode(MULTIPLE_BIB_SEPARATOR,$k) as $bibfile) { |
|
|
|
$db->load($bibfile); |
|
|
|
$output[] = basename($bibfile); |
|
|
|
} |
|
|
|
$output = implode(';', $output).'.txt'; |
|
|
|
|
|
|
|
// sorting the entries
|
|
|
|
ksort($db->bibdb); |
|
|
@ -34,7 +38,7 @@ foreach ($testbibs as $k) { |
|
|
|
$result .= var_export($bib->fields, true)."\n"; |
|
|
|
} |
|
|
|
//echo $result;
|
|
|
|
file_put_contents($k.'.txt',$result); |
|
|
|
file_put_contents(dirname(__FILE__).'/output/'.$output,$result); |
|
|
|
} |
|
|
|
|
|
|
|
?>
|