Sha256: 2c01294b6841f143465751e0c54301da52b9989c3367ded6dff3284e7477f71f

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/string/fold.rb
#
# Extracted Fri Feb 16 02:00:37 EST 2007
# Project.rb Test Extraction
#

require 'facets/core/string/fold.rb'


  require 'test/unit'

  class TCString < Test::Unit::TestCase

    def test_fold_1
      s = "This is\na test.\n\nIt clumps\nlines of text."
      o = "This is a test.\n\nIt clumps lines of text."
      assert_equal( o, s.fold )
    end

    def test_fold_2
      s = "This is\na test.\n\n  This is pre.\n  Leave alone.\n\nIt clumps\nlines of text."
      o = "This is a test.\n\n  This is pre.\n  Leave alone.\n\nIt clumps lines of text."
      assert_equal( o, s.fold(true) )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.8.49 test/lib/facets/core/string/test_fold.rb