[pango: 3/4] test-common: do case-insensitive diffs



commit 1ab184fa945c88fca01389f0128b210b1330f454
Author: Ross Burton <ross burton intel com>
Date:   Mon Mar 4 13:18:37 2019 +0000

    test-common: do case-insensitive diffs
    
    Typically the tests don't care about the case of the characters, but
    g_printf("%s", 0x0) returns "(null)" if glibc is being used and "(NULL)" if
    gnulib's drop-in replacement are used.  Fixes #356

 tests/test-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-common.c b/tests/test-common.c
index 76e74099..34c0e9a8 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -39,7 +39,7 @@ diff_with_file (const char  *file,
                 gssize       len,
                 GError     **error)
 {
-  const char *command[] = { "diff", "-u", file, NULL, NULL };
+  const char *command[] = { "diff", "-u", "-i", file, NULL, NULL };
   char *diff, *tmpfile;
   int fd;
 
@@ -62,7 +62,7 @@ diff_with_file (const char  *file,
       goto done;
     }
   close (fd);
-  command[3] = tmpfile;
+  command[4] = tmpfile;
 
   /* run diff command */
   g_spawn_sync (NULL,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]