Sha256: 5b30f3d757dcd3fbf148e5e352fd993612568d2e26711eaedfda717b82124de3

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: binary -*-

$:.unshift(File.join(File.dirname(__FILE__), '..', '..'))

require 'test/unit'
require 'rex/text'
require 'rex/assembly/nasm'

class Rex::Assembly::Nasm::UnitTest < ::Test::Unit::TestCase

	Klass = Rex::Assembly::Nasm

	def test_assemble
		assert_equal("\x6a\x00", Klass.assemble("push byte 0x00"))
		assert_equal("\xb2\xb4", Klass.assemble("mov dl, 0xb4"))
	end

	def test_disassemble
		assert_equal("00000000  31C0              xor eax,eax\n", Klass.disassemble("\x31\xc0"))
	end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
librex-0.0.68 lib/rex/assembly/nasm.rb.ut.rb
librex-0.0.66 lib/rex/assembly/nasm.rb.ut.rb