From a947231851a40a753d8d0d08fb863f9fa279cb86 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Sep 2026 14:44:26 -0700 Subject: [PATCH] =?UTF-8?q?Port=20gcc-tests=20to=20Solaris=2010=E2=80=99s?= =?UTF-8?q?=20GCC=203.4.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Paul Eggert (Bug#81484). * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test): Do not assume GCC is version 4 or later. (semantic-gcc-test/1, semantic-gcc-test/6): Update GCC version number. * test/src/regex-emacs-tests.el (regex-tests-generic-line): Read the test file in utf-8-unix. --- test/lisp/cedet/semantic/bovine/gcc-tests.el | 13 ++++++++----- test/src/regex-emacs-tests.el | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/lisp/cedet/semantic/bovine/gcc-tests.el b/test/lisp/cedet/semantic/bovine/gcc-tests.el index 289f7e50ba8..aad7a8145b3 100644 --- a/test/lisp/cedet/semantic/bovine/gcc-tests.el +++ b/test/lisp/cedet/semantic/bovine/gcc-tests.el @@ -38,7 +38,10 @@ ;; No longer test for prefixes. ;; (should .--prefix) (should .version) - (should (or .target + ;; "gcc -v" didn't start outputting "--host" etc. until + ;; GCC 4 (2005), when the GCC folks switched to using Autoconf. + (should (or (version< .version "4.0") + .target .--target .--host))))) @@ -46,10 +49,10 @@ (ert-deftest semantic-gcc-test/1 () ;; My old box: - (semantic-gcc-test "Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs + (semantic-gcc-test "Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/4.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix -gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)")) +gcc version 4.2.2 20030222 (Red Hat Linux 4.2.2-5)")) (ert-deftest semantic-gcc-test/2 () ;; Alex Ott: @@ -85,10 +88,10 @@ gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)")) (ert-deftest semantic-gcc-test/6 () ;; Red Hat EL4 - (semantic-gcc-test "Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs + (semantic-gcc-test "Reading specs from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux Thread model: posix -gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)")) +gcc version 4.4.6 20060404 (Red Hat 4.4.6-10)")) (ert-deftest semantic-gcc-test/7 () ;; Red Hat EL5 diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el index 061fb73ba8f..9635f8636f8 100644 --- a/test/src/regex-emacs-tests.el +++ b/test/src/regex-emacs-tests.el @@ -105,7 +105,8 @@ are known failures, and are skipped." `(with-temp-buffer (modify-syntax-entry ?_ "w;; ") ; tests expect _ to be a word - (insert-file-contents (concat regex-tests--resources-dir ,test-file)) + (let ((coding-system-for-read 'utf-8-unix)) + (insert-file-contents (concat regex-tests--resources-dir ,test-file))) (let ((case-fold-search nil) (line-number 1) (whitelist-idx 0))