Sha256: cc7295140ae3a33520bd16f5041cb74ffca47f336208e13ba14744ede90ffd1e

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

require 'test/unit'
require 'facet/lisp-format'


class FormatTest < Test::Unit::TestCase
  
  def test_decimal
    assert( Lisp.format("~D", 1) == "1" )
  end

  def test_decimal_params
    assert( Lisp.format("~5,'-D~6D", 1, 2) == "----1     2" )
  end

  def test_decimal_modifiers
    assert( Lisp.format("~5,'-,'.:@D~@D", 1013, 2) == "+1.013+2" )
    assert( Lisp.format("~7,,,2:@D~@D", 1013, 2) == " +10,13+2" )
  end

  # Tests for ~v, ~V, ~#

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.7.0 test/tc_lisp-format.rb
facets-0.7.1 test/tc_lisp-format.rb
facets-0.7.2 test/tc_lisp-format.rb