mirror of https://github.com/Nonannet/pelfy.git
test extended for iterating section.symbols
This commit is contained in:
parent
e2a6c1bcd4
commit
da74692664
|
@ -19,10 +19,17 @@ def test_simple_c() -> None:
|
||||||
print(elf.code_relocations)
|
print(elf.code_relocations)
|
||||||
print('\n')
|
print('\n')
|
||||||
|
|
||||||
|
section_count = 0
|
||||||
assert elf.sections
|
assert elf.sections
|
||||||
for section in elf.sections:
|
for section in elf.sections:
|
||||||
assert known_name(section.description), f"Section type {section.type} for {elf.architecture} in {path} is unknown."
|
assert known_name(section.description), f"Section type {section.type} for {elf.architecture} in {path} is unknown."
|
||||||
|
|
||||||
|
for sym in section.symbols:
|
||||||
|
assert known_name(sym.info), f"Symbol info {sym.info} for {elf.architecture} in {path} is unknown."
|
||||||
|
section_count += 1
|
||||||
|
|
||||||
|
assert section_count > 2
|
||||||
|
|
||||||
assert elf.symbols
|
assert elf.symbols
|
||||||
for sym in elf.symbols:
|
for sym in elf.symbols:
|
||||||
assert known_name(sym.info), f"Symbol info {sym.info} for {elf.architecture} in {path} is unknown."
|
assert known_name(sym.info), f"Symbol info {sym.info} for {elf.architecture} in {path} is unknown."
|
||||||
|
|
Loading…
Reference in New Issue