[BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme test_cut_symbol.rb, NONE, 1.1 test_double_stranded.rb, 1.2, 1.3
Trevor Wennblom
trevor at dev.open-bio.org
Mon Jan 1 02:16:07 UTC 2007
Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme
In directory dev.open-bio.org:/tmp/cvs-serv512/test/unit/bio/util/restriction_enzyme
Modified Files:
test_double_stranded.rb
Added Files:
test_cut_symbol.rb
Log Message:
Index: test_double_stranded.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_double_stranded.rb 31 Dec 2006 18:46:14 -0000 1.2
--- test_double_stranded.rb 1 Jan 2007 02:16:05 -0000 1.3
***************
*** 106,113 ****
end
- def test_index_error
- assert_raise(IndexError) { @t.new('EzzRII') }
- end
-
# NOTE
def test_to_re
--- 106,109 ----
--- NEW FILE: test_cut_symbol.rb ---
#
# test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb - Unit test for Bio::RestrictionEnzyme::CutSymbol
#
# Author:: Trevor Wennblom <mailto:trevor at corevx.com>
# Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com)
# License:: Distributes under the same terms as Ruby
#
# $Id: test_cut_symbol.rb,v 1.1 2007/01/01 02:16:05 trevor Exp $
#
require 'pathname'
libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s
$:.unshift(libpath) unless $:.include?(libpath)
require 'test/unit'
require 'bio/util/restriction_enzyme/cut_symbol'
module Bio #:nodoc:
class TestStringFormatting < Test::Unit::TestCase #:nodoc:
include Bio::RestrictionEnzyme::CutSymbol
def setup
end
def test_methods
assert_equal('^', cut_symbol)
assert_equal('|', set_cut_symbol('|'))
assert_equal('|', cut_symbol)
assert_equal('\\|', escaped_cut_symbol)
assert_equal(/\|/, re_cut_symbol)
assert_equal('^', set_cut_symbol('^'))
assert_equal(3, "abc^de" =~ re_cut_symbol)
assert_equal(nil, "abc^de" =~ re_cut_symbol_adjacent)
assert_equal(3, "abc^^de" =~ re_cut_symbol_adjacent)
assert_equal(4, "a^bc^^de" =~ re_cut_symbol_adjacent)
assert_equal(nil, "a^bc^de" =~ re_cut_symbol_adjacent)
end
end
end
More information about the bioruby-cvs
mailing list