blackducksw/ohcount — pull request #28 by vitaut (2013-10-24 14:40:47+00:00)
Title: Handle magic descriptions like "PHP script, ASCII text".

libmagic version 5.11 and possibly other versions return descriptions in the format ` script, ASCII text (executable)?`. For example:

PHP script, ASCII text
Python script, ASCII text executable
Ruby script, ASCII text executable

This was causing test failures such as

run_tests: test/unit/detector_test.h:119: test_detector_detect_polyglot: Assertion `lang' failed.

The proposed PR fixes the issue by handling the new description format in `magic_parse`.