Sha256: d794d077a7e7d332ab2477b35a25eee7e1642ec1b58d7cbe8e14b5e0fbfe89b1
Contents?: true
Size: 1.61 KB
Versions: 6
Compression:
Stored size: 1.61 KB
Contents
#!/usr/bin/env ruby require 'test/unit' # Test of Columnize module class TestIssue3 < Test::Unit::TestCase @@TOP_SRC_DIR = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib') require File.join(@@TOP_SRC_DIR, 'columnize.rb') include Columnize # test columnize def test_long_column data = ["what's", "upppppppppppppppppp"] # Try at least one test where we give the module name explicitely. assert_equal("what's\nupppppppppppppppppp\n", Columnize::columnize(data, :arrange_vertical => false, :displaywidth => 7)) assert_equal("what's\nupppppppppppppppppp\n", Columnize::columnize(data, :arrange_vertical => true, :displaywidth => 7)) data = ["whaaaaaat's", "up"] assert_equal("whaaaaaat's\n up\n", Columnize::columnize(data, :arrange_vertical => false, :ljust => false, :displaywidth => 7)) assert_equal("whaaaaaat's\nup\n", Columnize::columnize(data, :arrange_vertical => false, :ljust => true, :displaywidth => 7)) assert_equal("whaaaaaat's\nup\n", Columnize::columnize(data, :arrange_vertical => true, :ljust => true, :displaywidth => 7)) end end
Version data entries
6 entries across 4 versions & 3 rubygems