Sha256: 34f96803254cc76f836afc57e5ab4ba0823321345d6f11275dce86845c78b829
Contents?: true
Size: 953 Bytes
Versions: 87
Compression:
Stored size: 953 Bytes
Contents
$VERBOSE = true require 'minitest/autorun' require File.expand_path("#{File.dirname(__FILE__)}/../lib/netrc") class TestParse < Minitest::Test 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
87 entries across 60 versions & 9 rubygems