diff --git a/src/staticweb.jl b/src/staticweb.jl index 406ffa1..5334c8c 100644 --- a/src/staticweb.jl +++ b/src/staticweb.jl @@ -149,9 +149,9 @@ function xin(entry) temp = [get(entry.fields, "note", ""), entry.date.year] end if temp_last - str *= join(filter!(!isempty, temp), ", ", ". ") + str *= something(join(filter!(!isempty, temp), ", ", ". "), "") else - str *= join(filter!(!isempty, temp), ", ") + str *= something(join(filter!(!isempty, temp), ", "), "") end if !isempty(str) str *= "." diff --git a/test/internal.jl b/test/internal.jl index 950cfc4..da0be29 100644 --- a/test/internal.jl +++ b/test/internal.jl @@ -35,26 +35,16 @@ using ReferenceTests }""" write("demo.bib", testdata) - @info "Testing import/export 1" Bibliography.import_bibtex(testdata) - @info "Testing import/export 2" mybib = Bibliography.import_bibtex("demo.bib") - @info "Testing import/export 3" Bibliography.export_bibtex("demo_export.bib", mybib) - @info "Testing import/export 4" mybib2 = Bibliography.import_bibtex("demo_export.bib") - @info "Testing import/export 5" rm("demo.bib") rm("demo_export.bib") - @info "Testing import/export 6" include("sort_bibliography.jl") - @info "Testing import/export 7" include("staticweb.jl") - @info "Testing import/export 8" include("cff.jl") - @info "Testing import/export 9" include("test-fileio.jl") - @info "Testing import/export 10" end diff --git a/test/result.bib b/test/result.bib new file mode 100644 index 0000000..d068e07 --- /dev/null +++ b/test/result.bib @@ -0,0 +1,143 @@ +@misc{CiteEprint, + primaryClass = {cs.AI}, + author = {Richoux, Florian and Baffier, Jean-François}, + eprint = {2002.09811}, + year = {2020}, + archivePrefix = {arXiv}, + title = {Automatic Cost Function Learning with Interpretable Compositional Networks} +} + +@article{CitekeyArticle, + number = {6}, + pages = {1143--1148}, + author = {Cohen, P. J.}, + year = {1963}, + volume = {50}, + journal = {Proceedings of the National Academy of Sciences}, + title = {The independence of the continuum hypothesis} +} + +@book{CitekeyBook, + publisher = {Penguin Random House}, + address = {New York, NY}, + author = {Susskind, Leonard and Hrabovsky, George}, + year = {2014}, + title = {Classical mechanics: the theoretical minimum} +} + +@booklet{CitekeyBooklet, + howpublished = {Distributed at the Stockholm Tourist Office}, + publisher = {Penguin Random House}, + address = {New York, NY}, + author = {Swetla, Maria}, + year = {2015}, + month = {{July}}, + title = {Canoe tours in {S}weden} +} + +@inbook{CitekeyInbook, + howpublished = {Distributed at the Stockholm Tourist Office}, + publisher = {Pearson}, + pages = {187--221}, + address = {New York, NY}, + booktitle = {Campbell Biology}, + author = {Urry, Lisa A. and Cain, Michael L. and Wasserman, Steven A. and Minorsky, Peter V. and Reece, Jane B.}, + year = {2016}, + month = {{July}}, + title = {Photosynthesis} +} + +@incollection{CitekeyIncollection, + publisher = {Springer}, + pages = {1--10}, + address = {New York, NY}, + booktitle = {Flow Cytometry Protocols}, + author = {Shapiro, Howard M.}, + editor = {Hawley, Teresa S. and Hawley, Robert G.}, + year = {2018}, + title = {Flow Cytometry: The Glass Is Half Full} +} + +@inproceedings{CitekeyInproceedings, + publisher = {ACM}, + pages = {207--216}, + address = {New York, NY}, + booktitle = {Proc. of the 6th Nordic Conf. on Human-Computer Interaction}, + author = {Holleis, Paul and Wagner, Matthias and Koolwaaij, Johan}, + series = {NordiCHI}, + year = {2010}, + title = {Studying mobile context-aware social services in the wild} +} + +@manual{CitekeyManual, + organization = {R Foundation for Statistical Computing}, + address = {Vienna, Austria}, + author = {Team, R Core}, + year = {2018}, + title = {{R}: A Language and Environment for Statistical Computing} +} + +@mastersthesis{CitekeyMastersthesis, + organization = {R Foundation for Statistical Computing}, + school = {Massachusetts Institute of Technology}, + address = {Cambridge, MA}, + author = {Tang, Jian}, + year = {1996}, + month = {Septembre}, + title = {Spin structure of the nucleon in the asymptotic limit} +} + +@misc{CitekeyMisc, + howpublished = {\url{https://www.nasa.gov/nh/pluto-the-other-red-planet}}, + author = {NASA}, + year = {2015}, + title = {Pluto: The 'Other' Red Planet} +} + +@phdthesis{CitekeyPhdthesis, + school = {Stanford University}, + address = {Stanford, CA}, + author = {Rempel, Robert Charles}, + year = {1956}, + month = {June}, + title = {Relaxation Effects for Coupled Nuclear Spins} +} + +@proceedings{CitekeyProceedings, + publisher = {Springer}, + address = {Cham, Switzerland}, + editor = {Stepney, Susan and Verlan, Sergey}, + series = {Lecture Notes in Computer Science}, + year = {2018}, + volume = {10867}, + title = {Proceedings of the 17th International Conference on Computation and Natural Computation, Fontainebleau, France} +} + +@techreport{CitekeyTechreport, + author = {Bennett, Vicki and Bowman, Kate and Wright, Sarah}, + editor = {Stepney, Susan and Verlan, Sergey}, + month = {September}, + title = {{W}asatch {S}olar {P}roject Final Report}, + publisher = {Springer}, + number = {DOE-SLC-6903-1}, + address = {Salt Lake City, UT}, + series = {Lecture Notes in Computer Science}, + year = {2018}, + volume = {10867}, + institution = {Salt Lake City Corporation} +} + +@unpublished{CitekeyUnpublished, + author = {Suresh, Mohinder}, + year = {2006}, + title = {Evolution: a revised theory} +} + +@misc{baffier2017experimental, + primaryClass = {cs.DS}, + author = {Baffier, Jean-François and Diez, Yago and Korman, Matias}, + eprint = {1706.04708}, + year = {2017}, + archivePrefix = {arXiv}, + title = {Experimental Study of Compressed Stack Algorithms in Limited Memory Environments} +}