Sha256: 87c36a9dbd3edd39d5caf3f06b2a79b9c57430f23c849dc4198b4accc9cb3a6e

Contents?: true

Size: 837 Bytes

Versions: 2

Compression:

Stored size: 837 Bytes

Contents

require 'bitclust/rrdparser'
require 'test/unit'

class TestRRDParser < Test::Unit::TestCase
  def test_title
    result = BitClust::RRDParser.split_doc <<HERE
= hoge
a
HERE
    assert_equal(["hoge", "a\n"], result)

    result = BitClust::RRDParser.split_doc <<HERE
==foo
a
=hoge
HERE
    assert_equal(["hoge", ""], result)


        result = BitClust::RRDParser.split_doc <<HERE
==[a:hoge]hoge
a
HERE
    assert_equal(["", "==[a:hoge]hoge\na\n"], result)
  end

  def test_undef
    result = BitClust::RRDParser.parse(<<HERE, 'dummy')
= module Dummy
== Instance Methods
--- test_undef

@undef

このメソッドは利用できない

HERE
    _library, methoddatabase = result
    test_undef_spec = BitClust::MethodSpec.parse('Dummy#test_undef')
    assert_equal(:undefined, methoddatabase.get_method(test_undef_spec).kind)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bitclust-core-1.3.0 test/test_rrdparser.rb
bitclust-core-1.2.6 test/test_rrdparser.rb