Skip to content

Commit 1ce84b5

Browse files
committed
feat: add ELF file parse for py version
1 parent 19c435e commit 1ce84b5

3 files changed

Lines changed: 525 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,30 @@ jobs:
122122
run: |
123123
python -c "from libsurgeon import extract_archive; print('Import OK')"
124124
125+
- name: Test ELF detection
126+
run: |
127+
python -c "from libsurgeon import is_elf_file, get_file_type, FileType; assert get_file_type('test.elf') == FileType.ELF; print('ELF detection OK')"
128+
129+
- name: Test module strategies
130+
run: |
131+
python -c "from libsurgeon import MODULE_STRATEGIES; assert len(MODULE_STRATEGIES) == 4; print('Module strategies OK')"
132+
133+
- name: Test progress bar
134+
run: |
135+
python -c "from libsurgeon import draw_progress_bar; bar = draw_progress_bar(50, 100); assert len(bar) == 40; print('Progress bar OK')"
136+
125137
- name: Test quality evaluation
126138
run: |
127139
# Create a sample decompiled file
128140
mkdir -p test_output
129141
echo 'void test() { return; }' > test_output/sample.cpp
130142
python evaluate_quality.py test_output/
143+
144+
- name: Test libsurgeon help
145+
run: |
146+
python libsurgeon.py --help
147+
# Verify ELF module option exists
148+
python libsurgeon.py --help | grep -q "\-m.*prefix\|alpha\|camelcase\|single"
131149
132150
# ============================================================
133151
# Documentation

0 commit comments

Comments
 (0)