Commit 661cd5eb8c6f4fd5476b024be3ee03a6e8471dfd
Committed by
Philippe Lagadec
1 parent
9f71892c
Initial support for unit tests (#201)
Showing
8 changed files
with
32 additions
and
0 deletions
.travis.yml
0 → 100644
README.md
| 1 | 1 | python-oletools |
| 2 | 2 | =============== |
| 3 | 3 | [](https://pypi.python.org/pypi/oletools) |
| 4 | + | |
| 4 | 5 | |
| 5 | 6 | [oletools](http://www.decalage.info/python/oletools) is a package of python tools to analyze |
| 6 | 7 | [Microsoft OLE2 files](http://en.wikipedia.org/wiki/Compound_File_Binary_Format) | ... | ... |
setup.py
tests/__init__.py
0 → 100644
tests/rtfobj/__init__.py
0 → 100644
tests/rtfobj/test_issue_185.py
0 → 100644
| 1 | +import unittest, sys, os | |
| 2 | + | |
| 3 | +from .. import testdata_reader | |
| 4 | +from oletools import rtfobj | |
| 5 | + | |
| 6 | +class TestRtfObjIssue185(unittest.TestCase): | |
| 7 | + def test_skip_space_after_bin_control_word(self): | |
| 8 | + data = testdata_reader.read('rtfobj/issue_185.rtf') | |
| 9 | + rtfp = rtfobj.RtfObjParser(data) | |
| 10 | + rtfp.parse() | |
| 11 | + objects = rtfp.objects | |
| 12 | + | |
| 13 | + self.assertTrue(len(objects) == 1) | |
| 14 | + | |
| 15 | +if __name__ == '__main__': | |
| 16 | + unittest.main() | ... | ... |
tests/test-data/rtfobj/issue_185.rtf
0 → 100644