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

Version Path
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.9 vendor/bundle/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.8 vendor/bundle/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/netrc-0.11.0/test/test_parse.rb