| 1 | use Test2::V0scip-perl cpan Catmandu-BibTeX 0.21 Test2/V0/; |
| 2 | use Catmandu::Importer::BibTeXscip-perl cpan Catmandu-BibTeX 0.21 Catmandu/Importer/BibTeX/; |
| 3 | |
| 4 | my $data = [ |
| 5 | { |
| 6 | _citekey => '2602779', |
| 7 | type => 'inproceedings', |
| 8 | author => [ |
| 9 | 'Boukricha, Hana', |
| 10 | 'Wachsmuth, Ipke', |
| 11 | 'Carminati, Maria Nella', |
| 12 | 'Knoeferle, Pia' |
| 13 | ], |
| 14 | editor => ['Turing, Alan',], |
| 15 | language => 'English', |
| 16 | publisher => 'IEEE', |
| 17 | title => 'A Computational Model of Empathy: Empirical Evaluation', |
| 18 | year => '2013', |
| 19 | }, |
| 20 | { |
| 21 | _citekey => '1890757', |
| 22 | type => 'article', |
| 23 | author => ['γλώσσα',], |
| 24 | journal => 'Journal of Physical Agents', |
| 25 | pages => '21–32', |
| 26 | title => |
| 27 | 'Domestic Applications for social robots - a user study on appearance and function', |
| 28 | year => '2008', |
| 29 | }, |
| 30 | ]; |
| 31 | |
| 32 | my $bibtex = <<TEX; |
| 33 | \@inproceedings{2602779, |
| 34 | author = {Boukricha, Hana and Wachsmuth, Ipke and Carminati, Maria Nella and Knoeferle, Pia}, |
| 35 | editor = {Turing, Alan}, |
| 36 | language = {English}, |
| 37 | publisher = {IEEE}, |
| 38 | title = {A Computational Model of Empathy: Empirical Evaluation}, |
| 39 | year = {2013}, |
| 40 | } |
| 41 | \@article{1890757, |
| 42 | author = {γλώσσα}, |
| 43 | journal = {Journal of Physical Agents}, |
| 44 | pages = {21--32}, |
| 45 | title = {Domestic Applications for social robots - a user study on appearance and function}, |
| 46 | year = {2008}, |
| 47 | } |
| 48 | TEX |
| 49 | |
| 50 | my $importer = Catmandu::Importer::BibTeX->newscip-perl cpan Catmandu-BibTeX 0.21 Catmandu/Importer/BibTeX/new().(file => \$bibtex); |
| 51 | |
| 52 | can_okscip-perl cpan Catmandu-BibTeX 0.21 main/can_ok().($importer, 'each'); |
| 53 | |
| 54 | isa_okscip-perl cpan Catmandu-BibTeX 0.21 main/isa_ok(). $importer, "Catmandu::Importer::BibTeX"; |
| 55 | |
| 56 | isscip-perl cpan Catmandu-BibTeX 0.21 main/is(). $importer->to_arrayscip-perl cpan Catmandu-BibTeX 0.21 Catmandu/Importer/BibTeX/to_array()., $data; |
| 57 | |
| 58 | done_testing; |