[sword-devel] testsuite windows patch

Greg Hellings greg.hellings at gmail.com
Mon Apr 27 19:02:57 MST 2009

On Mon, Apr 27, 2009 at 8:57 PM, Matthew Talbert <ransom1982 at gmail.com> wrote:
> This is a patch to fix the testsuite on Windows (MSYS). The tests
> output files that have Windows line endings, while the ones they are
> comparing to have Unix line endings. The --strip-trailing-cr causes
> diff to ignore that. On *nix, it does nothing (is harmless). I suspect
> it is harmless on Mac as well, but can't be sure about that.

Mac uses *nix line endings too, so stripping the trailing CR character
won't mangle the output in any way.  However, Mac already fails to
build the testsuite because of a compile problem with icutest.cpp
which has been documented before.  It attempts to #include a file that
Macs have under sys/ but other systems seem to have directly

It still is a problem with SVN HEAD as of this morning and should
probably be fixed before release.  I would submit a patch to do an
ugly #ifdef hack, but it really needs some sort of autotools work to
detect the proper location of the header, and I am completely
autotools agnostic.


> With this patch all of the tests pass on Windows, except for
> verseparsing-utf8, because I'm not building with ICU.
> Matthew
> Index: runtest.sh
> ===================================================================
> --- runtest.sh  (revision 2353)
> +++ runtest.sh  (working copy)
> @@ -26,7 +26,7 @@
>  fi
>  ./$1.sh > $1.try
> -BAD=`diff -u $1.try $1.good`
> +BAD=`diff -u --strip-trailing-cr $1.try $1.good`
>  if [ "$BAD" = "" ]; then
>        if [ "$2" = "-q" ]; then
>                exit 0
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list