[BioRuby-cvs] bioruby/test/unit/bio test_reference.rb,1.4,1.5
Naohisa Goto
ngoto at dev.open-bio.org
Wed Jun 4 14:58:10 UTC 2008
Update of /home/repository/bioruby/bioruby/test/unit/bio
In directory dev.open-bio.org:/tmp/cvs-serv1561/test/unit/bio
Modified Files:
test_reference.rb
Log Message:
test changed due to the improvement of Bio::Reference#bibtex
Index: test_reference.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_reference.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_reference.rb 31 May 2008 09:36:56 -0000 1.4
--- test_reference.rb 4 Jun 2008 14:58:08 -0000 1.5
***************
*** 103,112 ****
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)
end
def test_format_rd
str = "== Title of the study.\n\n* Hoge, J.P. and Fuga, F.B.\n\n* Theor. J. Hoge 2001 12:123-145 [PMID:12345678]\n\nHoge fuga. hoge fuga."
--- 103,147 ----
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},
! url = {http://example.com},
! }
! __END__
assert_equal(str, @obj.format('bibtex'))
assert_equal(str, @obj.bibtex)
end
+ def test_format_bibtex_with_arguments
+ str =<<__END__
+ @inproceedings{YourArticle,
+ author = {Hoge, J.P. and Fuga, F.B.},
+ title = {Title of the study.},
+ year = {2001},
+ volume = {12},
+ number = {3},
+ pages = {123--145},
+ booktitle = {Theor. J. Hoge},
+ month = {December},
+ }
+ __END__
+ assert_equal(str, @obj.format('bibtex', 'inproceedings', 'YourArticle',
+ { 'journal' => false,
+ 'url' => false,
+ 'booktitle' => @obj.journal,
+ 'month' => 'December'}))
+ assert_equal(str, @obj.bibtex('inproceedings', 'YourArticle',
+ { 'journal' => false,
+ 'url' => false,
+ 'booktitle' => @obj.journal,
+ 'month' => 'December'}))
+ end
+
def test_format_rd
str = "== Title of the study.\n\n* Hoge, J.P. and Fuga, F.B.\n\n* Theor. J. Hoge 2001 12:123-145 [PMID:12345678]\n\nHoge fuga. hoge fuga."
More information about the bioruby-cvs
mailing list