Sha256: d3e90591e48a56076bbd433759840bb8dc1baf5ed852d472715f9b10877c638b

Contents?: true

Size: 516 Bytes

Versions: 43

Compression:

Stored size: 516 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), '..', '..'))

require 'test/unit'
require 'rex/parser/ini'

class Rex::Parser::Ini::UnitTest < Test::Unit::TestCase

	Klass   = Rex::Parser::Ini
	TestIni = <<END
[group1]
cat=dog
bird=frog

[group2]
salad=cake
END

	def test_parse
		ini = Klass.from_s(TestIni)

		assert_equal('dog', ini['group1']['cat'])
		assert_equal('frog', ini['group1']['bird'])
		assert_equal('cake', ini['group2']['salad'])
		assert_equal(TestIni + "\n", ini.to_s)
	end
	
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/parser/ini.rb.ut.rb
librex-0.0.63 lib/rex/parser/ini.rb.ut.rb
librex-0.0.54 lib/rex/parser/ini.rb.ut.rb
librex-0.0.53 lib/rex/parser/ini.rb.ut.rb
librex-0.0.52 lib/rex/parser/ini.rb.ut.rb
librex-0.0.51 lib/rex/parser/ini.rb.ut.rb
librex-0.0.50 lib/rex/parser/ini.rb.ut.rb
librex-0.0.49 lib/rex/parser/ini.rb.ut.rb
librex-0.0.48 lib/rex/parser/ini.rb.ut.rb
librex-0.0.47 lib/rex/parser/ini.rb.ut.rb
librex-0.0.46 lib/rex/parser/ini.rb.ut.rb
librex-0.0.44 lib/rex/parser/ini.rb.ut.rb
librex-0.0.43 lib/rex/parser/ini.rb.ut.rb
librex-0.0.42 lib/rex/parser/ini.rb.ut.rb
librex-0.0.41 lib/rex/parser/ini.rb.ut.rb
librex-0.0.40 lib/rex/parser/ini.rb.ut.rb
librex-0.0.39 lib/rex/parser/ini.rb.ut.rb
librex-0.0.38 lib/rex/parser/ini.rb.ut.rb
librex-0.0.37 lib/rex/parser/ini.rb.ut.rb
librex-0.0.36 lib/rex/parser/ini.rb.ut.rb