Skip to content

Commit

Permalink
add shstrtab for twice
Browse files Browse the repository at this point in the history
  • Loading branch information
katsyoshi committed Mar 2, 2024
1 parent b0fe9f9 commit d17933e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
class Vaporware::Compiler::Assembler::ELF::Section::TestShstrtab < Test::Unit::TestCase
def setup = @shstrtab = Vaporware::Compiler::Assembler::ELF::Section::Shstrtab.new
def test_set_values
binary = "\x00.main\x00".force_encoding("ASCII-8BIT")
@shstrtab.set!(name: "main")

binary = "\x00.text\x00".force_encoding("ASCII-8BIT")
@shstrtab.set!(name: "text")
assert_equal(@shstrtab.build, binary)
binary = "\x00.text\x00.strtab\x00".force_encoding("ASCII-8BIT")
@shstrtab.set!(name: "strtab")
assert_equal(@shstrtab.build, binary)
end
def test_alert_values
Expand Down

0 comments on commit d17933e

Please sign in to comment.