Add BibTeX tests

This commit is contained in:
Alex Kotov 2024-10-19 02:02:30 +04:00
parent 0d42f3e0bb
commit c69a69c8e5
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -19,3 +19,19 @@ Repubmark::References::Item
ref.authors[0].last == 'Cohen' && ref.authors[0].last == 'Cohen' &&
ref.authors[0].first == 'P. J.' ref.authors[0].first == 'P. J.'
end end
Repubmark::References::Item
.from_bibtex('citekey-techreport', bib[:CitekeyTechreport])
.tap do |ref|
p ref
raise unless
ref.title == 'Wasatch Solar Project Final Report' &&
ref.year == 2018 &&
ref.authors.size == 3 &&
ref.authors[0].last == 'Bennett' &&
ref.authors[0].first == 'Vicki' &&
ref.authors[1].last == 'Bowman' &&
ref.authors[1].first == 'Kate' &&
ref.authors[2].last == 'Wright' &&
ref.authors[2].first == 'Sarah'
end