Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: python

python:
- "2.7"
cache: pip
script:
- python setup.py test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
python-oletools
===============
[![PyPI](https://img.shields.io/pypi/v/oletools.svg)](https://pypi.python.org/pypi/oletools)
![Build](https://travis-ci.org/samiraguiar/oletools.svg?branch=add-unit-tests)

[oletools](http://www.decalage.info/python/oletools) is a package of python tools to analyze
[Microsoft OLE2 files](http://en.wikipedia.org/wiki/Compound_File_Binary_Format)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def main():
download_url=download_url,
# data_files=data_files,
entry_points=entry_points,
test_suite="tests",
# scripts=scripts,
)

Expand Down
Empty file added tests/__init__.py
Empty file.
Empty file added tests/rtfobj/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions tests/rtfobj/test_issue_185.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import unittest, sys, os

from .. import testdata_reader
from oletools import rtfobj

class TestRtfObjIssue185(unittest.TestCase):
def test_skip_space_after_bin_control_word(self):
data = testdata_reader.read('rtfobj/issue_185.rtf')
rtfp = rtfobj.RtfObjParser(data)
rtfp.parse()
objects = rtfp.objects

self.assertTrue(len(objects) == 1)

if __name__ == '__main__':
unittest.main()
1 change: 1 addition & 0 deletions tests/test-data/rtfobj/issue_185.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{\rt{\object\objautlink\objupdate\rsltpict\objw37542\objh829\objscalex59286\objscaley86308{\*\objclass \'77}{\*\objdata 32\bin6 FF}}}
6 changes: 6 additions & 0 deletions tests/testdata_reader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os

def read(relative_path):
test_data = os.path.dirname(os.path.abspath(__file__)) + '/test-data/'
return open(test_data + relative_path, 'rb').read()