The gist tries to reproduce the issue from the SO question about the difference in the output between executing the same command in a shell and in python.
-
Install git, make, g++, env, bash, python, diff
For example, on Windows, you could install "git for Windows", "GnuWin32 make", "MinGW g++" and configure
%PATH%
correspondingly -
Clone gist
$ git clone https://gist.github.com/zed/dd44ade13d313ceb8ba8e384ba1ff1ac so-q $ cd so-q
-
Generate input data, build dummy c++, run the test:
$ make
If you see: "Files infile.txt and outfile.txt are identical" then there is no difference (the test has failed to reproduce the issue).