def it_has_sections(self): executable = Executable() text = executable.new_section(".text") executable |should| have(1).sections data = executable.new_section(".data") executable |should| have(2).sections executable.sections |should| include(text) executable.sections |should| include(data)
def it_is_structured_text(self): executable = Executable() text = executable.new_section(".text") text.new_function("_start") str(executable) |should| equal_to("section .text\n\n_start:\n\n\tret")