newline representations. Per buildfarm results and subsequent discussion.
Sync up a couple of other places that had their own policies.
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress_ecpg.c,v 1.5 2009/01/01 17:24:02 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress_ecpg.c,v 1.6 2009/11/23 16:02:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
static void
ecpg_init(void)
{
- /* no reason to set -w for ecpg checks, except for when on windows */
- if (strstr(host_platform, "-win32") || strstr(host_platform, "-mingw32"))
- basic_diff_opts = "-w";
- else
- basic_diff_opts = "";
- if (strstr(host_platform, "-win32") || strstr(host_platform, "-mingw32"))
- pretty_diff_opts = "-C3 -w";
- else
- pretty_diff_opts = "-C3";
+ /* nothing to do here at the moment */
}
int
#! /bin/sh
-# $PostgreSQL: pgsql/src/test/mb/mbregress.sh,v 1.10 2009/05/06 16:15:21 tgl Exp $
+# $PostgreSQL: pgsql/src/test/mb/mbregress.sh,v 1.11 2009/11/23 16:02:24 tgl Exp $
if echo '\c' | grep -s c >/dev/null 2>&1
then
if [ `diff ${EXPECTED} results/${i}.out | wc -l` -ne 0 ]
then
- ( diff -wC3 ${EXPECTED} results/${i}.out; \
+ ( diff -C3 ${EXPECTED} results/${i}.out; \
echo ""; \
echo "----------------------"; \
echo "" ) >> regression.diffs
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.66 2009/11/22 17:54:23 tgl Exp $
+ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.67 2009/11/23 16:02:24 tgl Exp $
*
*-------------------------------------------------------------------------
*/
static char *shellprog = SHELLPROG;
#endif
-/* currently we can use the same diff switches on all platforms */
+/*
+ * On Windows we use -w in diff switches to avoid problems with inconsistent
+ * newline representation. The actual result files will generally have
+ * Windows-style newlines, but the comparison files might or might not.
+ */
+#ifndef WIN32
const char *basic_diff_opts = "";
const char *pretty_diff_opts = "-C3";
+#else
+const char *basic_diff_opts = "-w";
+const char *pretty_diff_opts = "-w -C3";
+#endif
/* options settable from command line */
_stringlist *dblist = NULL;