403Webshell
Server IP : 68.178.247.200  /  Your IP : 216.73.216.14
Web Server : Apache
System : Linux p3plzcpnl489463.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : x9dppmxs4rgd ( 8559391)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/thread-self/root/opt/alt/ruby32/share/gems/gems/netrc-0.11.0/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/opt/alt/ruby32/share/gems/gems/netrc-0.11.0/test/test_parse.rb
$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

Youez - 2016 - github.com/yon3zu
LinuXploit