# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/nano/string/first.rb # # Extracted Fri Oct 28 14:20:18 EDT 2005 # Unit Tools Reap Test Extractor # require 'nano/string/first.rb' require 'test/unit' class TCString < Test::Unit::TestCase def test_first assert_equal( "a", "abcxyz".first ) assert_equal( "ax", "ax by cz".first(' ') ) assert_equal( "a", "a\nb\nc".first("\n") ) end def test_first_eq s = "abc" s.first = "123" assert_equal( "123abc", s ) s = "a\nbc" s.first = "123" assert_equal( "123a\nbc", s ) end def test_first! s = "a\nbc" s.first!("\n") assert_equal( "bc", s ) end end