[cairo] [PATCH 3/3] [test] Use UTF-8 in test files
Bryce Harrington
bryce at osg.samsung.com
Tue Mar 10 12:31:42 PDT 2015
On Tue, Mar 10, 2015 at 12:10:36PM +0100, Andrea Canciani wrote:
> From: Andrea Canciani <ranma42 at gmail.com>
>
> On MacOSX, the sed utility errors out when parsing non-UTF8
> files. Because of this, the generated cairo-test-constructor only
> contained a few tests and the test suite was thus incomplete.
> ---
> test/composite-integer-translate-over.c | 2 +-
> test/degenerate-dash.c | 2 +-
> test/degenerate-path.c | 2 +-
> test/long-dashed-lines.c | 2 +-
> test/reflected-stroke.c | 2 +-
> test/user-font-rescale.c | 4 ++--
> 6 files changed, 7 insertions(+), 7 deletions(-)
Hrm, this patch isn't applying for me.
error: patch failed: test/user-font-rescale.c:22
Applying patch test/composite-integer-translate-over.c with 1 reject...
Rejected hunk #1.
Applying patch test/degenerate-dash.c with 1 reject...
Rejected hunk #1.
Applying patch test/degenerate-path.c with 1 reject...
Rejected hunk #1.
Applying patch test/long-dashed-lines.c with 1 reject...
Rejected hunk #1.
Applying patch test/reflected-stroke.c with 1 reject...
Rejected hunk #1.
Applying patch test/user-font-rescale.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Patch failed at 0001 Use UTF-8 in test files
Guessing it to be some sort of platform specific encoding issue.
$ FILES=$(file *.c | grep -v UTF-8 | grep -v ASCII | cut -d: -f1)
$ file $FILES
composite-integer-translate-over.c: C source, ISO-8859 text
degenerate-dash.c: C source, ISO-8859 text
degenerate-path.c: C source, ISO-8859 text
long-dashed-lines.c: C source, ISO-8859 text
reflected-stroke.c: C source, ISO-8859 text
user-font-rescale.c: C source, ISO-8859 text
$ for file in $FILES; do iconv -f iso-8859-1 -t utf-8 $file > $file.new; mv $file.new $file; done
$ file $FILES
composite-integer-translate-over.c: C source, UTF-8 Unicode text
degenerate-dash.c: C source, UTF-8 Unicode text
degenerate-path.c: C source, UTF-8 Unicode text
long-dashed-lines.c: C source, UTF-8 Unicode text
reflected-stroke.c: C source, UTF-8 Unicode text
user-font-rescale.c: C source, UTF-8 Unicode text
Hopefully that works for you; if not please follow up.
Bryce
> diff --git a/test/composite-integer-translate-over.c b/test/composite-integer-translate-over.c
> index 4f89fa8..1b82a33 100644
> --- a/test/composite-integer-translate-over.c
> +++ b/test/composite-integer-translate-over.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright ? 2006 Mozilla Corporation
> + * Copyright © 2006 Mozilla Corporation
> *
> * Permission to use, copy, modify, distribute, and sell this software
> * and its documentation for any purpose is hereby granted without
> diff --git a/test/degenerate-dash.c b/test/degenerate-dash.c
> index 12cd0c7..6e7bf6b 100644
> --- a/test/degenerate-dash.c
> +++ b/test/degenerate-dash.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright ? 2008 Chris Wilson
> + * Copyright © 2008 Chris Wilson
> *
> * Permission to use, copy, modify, distribute, and sell this software
> * and its documentation for any purpose is hereby granted without
> diff --git a/test/degenerate-path.c b/test/degenerate-path.c
> index db53cbb..aa5f822 100644
> --- a/test/degenerate-path.c
> +++ b/test/degenerate-path.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright ? 2006 Jeff Muizelaar
> + * Copyright © 2006 Jeff Muizelaar
> *
> * Permission to use, copy, modify, distribute, and sell this software
> * and its documentation for any purpose is hereby granted without
> diff --git a/test/long-dashed-lines.c b/test/long-dashed-lines.c
> index 215bd91..4d6ded9 100644
> --- a/test/long-dashed-lines.c
> +++ b/test/long-dashed-lines.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright ? 2008 Chris Wilson
> + * Copyright © 2008 Chris Wilson
> *
> * Permission to use, copy, modify, distribute, and sell this software
> * and its documentation for any purpose is hereby granted without
> diff --git a/test/reflected-stroke.c b/test/reflected-stroke.c
> index b11f5a9..895396a 100644
> --- a/test/reflected-stroke.c
> +++ b/test/reflected-stroke.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright ? 2008 Chris Wilson
> + * Copyright © 2008 Chris Wilson
> *
> * Permission to use, copy, modify, distribute, and sell this software
> * and its documentation for any purpose is hereby granted without
> diff --git a/test/user-font-rescale.c b/test/user-font-rescale.c
> index 3fe70f6..6f03b8e 100644
> --- a/test/user-font-rescale.c
> +++ b/test/user-font-rescale.c
> @@ -1,5 +1,5 @@
> /*
> - * Copyright ? 2008 Jeff Muizelaar
> + * Copyright © 2008 Jeff Muizelaar
> *
> * Permission to use, copy, modify, distribute, and sell this software
> * and its documentation for any purpose is hereby granted without
> @@ -22,7 +22,7 @@
> *
> * Contributor(s):
> * Jeff Muizelaar <jeff at infidigm.net>
> - * Kristian H?gsberg <krh at redhat.com>
> + * Kristian Høgsberg <krh at redhat.com>
> * Behdad Esfahbod <behdad at behdad.org>
> */
>
> --
> 1.9.3 (Apple Git-50)
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list