Sha256: 49db6c1305186a08c30277cb0145b69faaa6235094a6541a2e835be92f967406
Contents?: true
Size: 952 Bytes
Versions: 23
Compression:
Stored size: 952 Bytes
Contents
$VERBOSE = true require 'test/unit' require File.expand_path("#{File.dirname(__FILE__)}/../lib/netrc") class TestParse < Test::Unit::TestCase def test_parse_empty pre, items = Netrc.parse([]) assert_equal("", pre) assert_equal([], items) end def test_parse_comment pre, items = Netrc.parse(["# foo\n"]) assert_equal("# foo\n", pre) assert_equal([], items) end def test_parse_item t = ["machine", " ", "m", " ", "login", " ", "l", " ", "password", " ", "p", "\n"] pre, items = Netrc.parse(t) assert_equal("", pre) e = [["machine ", "m", " login ", "l", " password ", "p", "\n"]] assert_equal(e, items) end def test_parse_two_items t = ["machine", " ", "m", " ", "login", " ", "l", " ", "password", " ", "p", "\n"] * 2 pre, items = Netrc.parse(t) assert_equal("", pre) e = [["machine ", "m", " login ", "l", " password ", "p", "\n"]] * 2 assert_equal(e, items) end end
Version data entries
23 entries across 23 versions & 4 rubygems