docopt / docopt.cpp

C++11 port of docopt
Boost Software License 1.0
1.05k stars 146 forks source link

Example runs fine, but tests fail [gcc 5.2.0] #29

Open tanweihou opened 9 years ago

tanweihou commented 9 years ago

Some outputs are shown as below, full log is here http://pastie.org/10499035 I tried the pull request #13 but it did not work too Besides that, for some reasons the python test script could not decode some JSON objects The example naval_fate runs fine without any problem.

Python version: 2.7.10 GCC: 5.2.0

========================================
Usage: prog [options]

Options: -a  All.

::::::::::::::::::::
prog 
--------------------
{  }

 ** JSON does not match expected: {u'-a': False}
========================================
Usage: prog [options]

Options: -p PATH

::::::::::::::::::::
prog -p home/
--------------------

 ** this should have succeeded! exit code = 255
Traceback (most recent call last):
  File "run_tests", line 45, in <module>
    json_out = json.loads(out)
  File "/anaconda/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/anaconda/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/anaconda/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
GamePad64 commented 8 years ago

Can't confirm. Ubuntu 15.10, GCC 5.2, Python 2.7.10 Both tests and example run fine.

jaredgrubb commented 7 years ago

Is this still an issue?