MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.119
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/local/share/gems/gems/httpclient-2.8.3/test/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/local/share/gems/gems/httpclient-2.8.3/test/test_hexdump.rb
# -*- encoding: utf-8 -*-
require File.expand_path('helper', File.dirname(__FILE__))
require 'hexdump'


class TestHexDump < Test::Unit::TestCase
  def test_encode
    str = "\032l\277\370\2429\216\236\351[{\{\262\350\274\376"
    str.force_encoding('BINARY') if str.respond_to?(:force_encoding)
    assert_equal(["00000000  1a6cbff8 a2398e9e e95b7b7b b2e8bcfe   .l...9...[{{...."], HexDump.encode(str))
  end
end if defined?(RUBY_ENGINE) && RUBY_ENGINE != "rbx" && RUBY_VERSION >= "1.9.0"
# Rubinius 1.8 mode does not support Regexp.quote(raw, 'n')  I don't want put
# a pressure on supporting it because 1.9 mode works fine.

MMCT - 2023