-
Want to use the OutputCapture in another unit test. There will probably be more such test helpers over time that need to be imported from different unit tests.
-
The old version assumed that main() is only called once per import. When called multiple times from other scripts, the json output lacked a leading '['.
-
This simplifies unit test creation a lot
-
- fix some whitespace and docs - replace bare-except - omit empty dde links in output
-
This is the case e.g. if piping the output of msodde.py to file or other program (e.g. grep) on a linux shell. In that case sys.stdout (i.e. print) can only handle ascii, which is a problem when printing unicode dde links.
-
Log output is not json-compatible, so warn if -ldebug -j is given to msodde. (Could create a logger formatter that always creates json-compatible output but that is probably overkill right now) Replace old commented debug-prints with log.debug() or remove them.
-
Doc in msodde (and json output)
-
These tests capture stdout to check whether msodde finds dde links correctly
-
This should help avoiding some common mistakes when adding new unit tests
-
The test documents supplied here may contain DDE links but these only start calc.exe. No links to web pages there.
-
Custom command line arguments greatly simplifies unit test creation for the main method. Also, avoid calling sys.exit in functions (that is good practice if I recall corretly).
-
Also correct banner and use the argparse-way to test for file existence
-
Tested with Python 3.3.2
-
Works with Python 2.7, still have to check with other versions
-
Output is only json-compatible if program succeeded (return code 0). Otherwise there may be error messages (i.e. from argument parsing).
-
…should help pickup DDE links embedded into headers/footers/endnotes/etc. If other locations are identified, these can be added to the 'LOCATIONS' constant
-
* Adds an additional check to detect if DDE links exist inside fldSimple values * clean-up to use TAG_W_INSTRATTR instead of constructing string during parsing
-
Reset the level counter with each w:p as far as I can see field codes shouldn't cross w:p tags
-
…ind "begin" and "end" tags. All field codes within these will be grouped together. Should account for nested field codes as well. Values like { SET a { QUOTE 65 65 65 65 } } should be parsed out correctly.