public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain Buclaw <ibuclaw@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-9062] d: Add UTF BOM tests to gdc.dg testsuite Date: Mon, 19 Feb 2024 10:58:57 +0000 (GMT) [thread overview] Message-ID: <20240219105857.3DE64386187E@sourceware.org> (raw) https://gcc.gnu.org/g:eb17bdc211ab12fd53b0a6bc926ef7ecbce40c72 commit r14-9062-geb17bdc211ab12fd53b0a6bc926ef7ecbce40c72 Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Mon Feb 19 11:33:16 2024 +0100 d: Add UTF BOM tests to gdc.dg testsuite Some of these are part of the upstream DMD `gdc.test' testsuite, but they had been omitted because they get mangled by the lib/gdc-utils.exp helpers when parsing and staging the tests. Translate them over to the gdc.dg testsuite instead. gcc/testsuite/ChangeLog: * gdc.dg/bom_UTF16BE.d: New test. * gdc.dg/bom_UTF16LE.d: New test. * gdc.dg/bom_UTF32BE.d: New test. * gdc.dg/bom_UTF32LE.d: New test. * gdc.dg/bom_UTF8.d: New test. * gdc.dg/bom_characters.d: New test. * gdc.dg/bom_error_UTF8.d: New test. * gdc.dg/bom_infer_UTF16BE.d: New test. * gdc.dg/bom_infer_UTF16LE.d: New test. * gdc.dg/bom_infer_UTF32BE.d: New test. * gdc.dg/bom_infer_UTF32LE.d: New test. * gdc.dg/bom_infer_UTF8.d: New test. Diff: --- gcc/testsuite/gdc.dg/bom_UTF16BE.d | Bin 0 -> 300 bytes gcc/testsuite/gdc.dg/bom_UTF16LE.d | Bin 0 -> 300 bytes gcc/testsuite/gdc.dg/bom_UTF32BE.d | Bin 0 -> 556 bytes gcc/testsuite/gdc.dg/bom_UTF32LE.d | Bin 0 -> 556 bytes gcc/testsuite/gdc.dg/bom_UTF8.d | 11 +++++++++++ gcc/testsuite/gdc.dg/bom_characters.d | Bin 0 -> 780 bytes gcc/testsuite/gdc.dg/bom_error_UTF8.d | 11 +++++++++++ gcc/testsuite/gdc.dg/bom_infer_UTF16BE.d | Bin 0 -> 298 bytes gcc/testsuite/gdc.dg/bom_infer_UTF16LE.d | Bin 0 -> 298 bytes gcc/testsuite/gdc.dg/bom_infer_UTF32BE.d | Bin 0 -> 552 bytes gcc/testsuite/gdc.dg/bom_infer_UTF32LE.d | Bin 0 -> 552 bytes gcc/testsuite/gdc.dg/bom_infer_UTF8.d | 11 +++++++++++ 12 files changed, 33 insertions(+) diff --git a/gcc/testsuite/gdc.dg/bom_UTF16BE.d b/gcc/testsuite/gdc.dg/bom_UTF16BE.d new file mode 100644 index 000000000000..f18cec9b1e59 Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_UTF16BE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_UTF16LE.d b/gcc/testsuite/gdc.dg/bom_UTF16LE.d new file mode 100644 index 000000000000..e79a4ddbce16 Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_UTF16LE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_UTF32BE.d b/gcc/testsuite/gdc.dg/bom_UTF32BE.d new file mode 100644 index 000000000000..eaf3b04b458f Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_UTF32BE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_UTF32LE.d b/gcc/testsuite/gdc.dg/bom_UTF32LE.d new file mode 100644 index 000000000000..89824d611dfc Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_UTF32LE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_UTF8.d b/gcc/testsuite/gdc.dg/bom_UTF8.d new file mode 100644 index 000000000000..f3e8af4eb388 --- /dev/null +++ b/gcc/testsuite/gdc.dg/bom_UTF8.d @@ -0,0 +1,11 @@ +// { dg-do compile } +module object; + +extern(C): +int printf(const char *, ...); + +int main() +{ + printf("hello world\n"); + return 0; +} diff --git a/gcc/testsuite/gdc.dg/bom_characters.d b/gcc/testsuite/gdc.dg/bom_characters.d new file mode 100644 index 000000000000..4b42b4c611ba Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_characters.d differ diff --git a/gcc/testsuite/gdc.dg/bom_error_UTF8.d b/gcc/testsuite/gdc.dg/bom_error_UTF8.d new file mode 100644 index 000000000000..0e47e59bda38 --- /dev/null +++ b/gcc/testsuite/gdc.dg/bom_error_UTF8.d @@ -0,0 +1,11 @@ +// { dg-do compile } +module object; // { dg-error "character 0xfeff is not a valid token" } + +extern(C): +int printf(const char *, ...); + +int main() +{ + printf("hello world\n"); + return 0; +} diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF16BE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF16BE.d new file mode 100644 index 000000000000..c75076252aee Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_infer_UTF16BE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF16LE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF16LE.d new file mode 100644 index 000000000000..772891d9443c Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_infer_UTF16LE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF32BE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF32BE.d new file mode 100644 index 000000000000..c52f102ea812 Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_infer_UTF32BE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF32LE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF32LE.d new file mode 100644 index 000000000000..dd290e3e1dda Binary files /dev/null and b/gcc/testsuite/gdc.dg/bom_infer_UTF32LE.d differ diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF8.d b/gcc/testsuite/gdc.dg/bom_infer_UTF8.d new file mode 100644 index 000000000000..bf345ac488a1 --- /dev/null +++ b/gcc/testsuite/gdc.dg/bom_infer_UTF8.d @@ -0,0 +1,11 @@ +// { dg-do compile } +module object; + +extern(C): +int printf(const char *, ...); + +int main() +{ + printf("hello world\n"); + return 0; +}
reply other threads:[~2024-02-19 10:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240219105857.3DE64386187E@sourceware.org \ --to=ibuclaw@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).