[BioRuby-cvs] bioruby/test/unit/bio test_reference.rb,1.3,1.4
Pjotr Prins
pjotr at dev.open-bio.org
Sat May 31 09:36:58 UTC 2008
Update of /home/repository/bioruby/bioruby/test/unit/bio
In directory dev.open-bio.org:/tmp/cvs-serv20293/test/unit/bio
Modified Files:
test_reference.rb
Log Message:
- Bibtex: reverted on url regression per comment Naohisa - now it gets overridden on empty for pubmed only.
- Bibtex: fixed unit tests
Index: test_reference.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_reference.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_reference.rb 5 Apr 2007 23:35:42 -0000 1.3
--- test_reference.rb 31 May 2008 09:36:56 -0000 1.4
***************
*** 91,95 ****
def test_format_endnote
! str = "%0 Journal Article\n%A Hoge, J.P.\n%A Fuga, F.B.\n%D 2001\n%T Title of the study.\n%J Theor. J. Hoge\n%V 12\n%N 3\n%P 123-145\n%M 12345678\n%U http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&dopt=Citation&list_uids=12345678\n%X Hoge fuga. hoge fuga.\n%K Hoge\n%+ Tokyo"
assert_equal(str, @obj.format('endnote'))
assert_equal(str, @obj.endnote)
--- 91,95 ----
def test_format_endnote
! str = "%0 Journal Article\n%A Hoge, J.P.\n%A Fuga, F.B.\n%D 2001\n%T Title of the study.\n%J Theor. J. Hoge\n%V 12\n%N 3\n%P 123-145\n%M 12345678\n%U http://example.com\n%X Hoge fuga. hoge fuga.\n%K Hoge\n%+ Tokyo"
assert_equal(str, @obj.format('endnote'))
assert_equal(str, @obj.endnote)
***************
*** 103,117 ****
def test_format_bibtex
! str =<<END
! @article{PMID:12345678,
! author = {Hoge, J.P. and Fuga, F.B.},
! title = {Title of the study.},
! journal = {Theor. J. Hoge},
! year = {2001},
! volume = {12},
! number = {3},
! pages = {123--145},
! }
! END
assert_equal(str, @obj.format('bibtex'))
assert_equal(str, @obj.bibtex)
--- 103,108 ----
def test_format_bibtex
! str = "@article{PMID:12345678,\n author = {Hoge, J.P. and Fuga, F.B.},\n title = {Title of the study},\n journal = {Theor. J. Hoge},\n year = {2001},\n volume = {12},\n number = {3},\n pages = {123-145},\n url = {http://example.com},\n}\n"
!
assert_equal(str, @obj.format('bibtex'))
assert_equal(str, @obj.bibtex)
More information about the bioruby-cvs
mailing list