]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
more test suite changes to partially highlight warning messages; several fixes to...
authorChet Ramey <chet.ramey@case.edu>
Fri, 17 Oct 2025 19:30:08 +0000 (15:30 -0400)
committerChet Ramey <chet.ramey@case.edu>
Fri, 17 Oct 2025 19:30:08 +0000 (15:30 -0400)
33 files changed:
CWRU/CWRU.chlog
lib/glob/sm_loop.c
lib/sh/oslib.c
tests/RUN-ONE-TEST
tests/arith5.sub
tests/conv-warnings [new file with mode: 0644]
tests/glob2.sub
tests/intl2.sub
tests/run-all
tests/run-array
tests/run-array2
tests/run-assoc
tests/run-builtins
tests/run-cond
tests/run-execscript
tests/run-func
tests/run-heredoc
tests/run-histexpand
tests/run-history
tests/run-jobs
tests/run-nameref
tests/run-new-exp
tests/run-nquote1
tests/run-nquote2
tests/run-nquote3
tests/run-nquote4
tests/run-procsub
tests/run-read
tests/run-redir
tests/run-trap
tests/run-varenv
tests/run-vredir
tests/unicode1.sub

index 1fc170d0f17941d60a27b3c8c3f80d65a9dec39b..34efc0dfd55b9bece620adc50a094ec4c2658dec 100644 (file)
@@ -12006,3 +12006,21 @@ tests/*.tests
          directly, so we can print a message with the name of the sub-test
          script into the output. This will help with identifying the script
          that fails
+         Original suggestion from Martin D Kealey <martin@kurahaupo.gen.nz>
+
+                                  10/16
+                                  -----
+tests/run-*
+       - highlight `warning' in warning messages
+
+                                  10/17
+                                  -----
+lib/glob/sm_loop.c
+       - BRACKMATCH: fix range parsing to treat collating symbols and
+         character classes consistently, don't treat invalid collating
+         symbols or equivalence classes as 0xFF, fix issue with escaped
+         open brackets when parsing the end of a range expression
+         Report and patch from Grisha Levit <grishalevit@gmail.com>
+
+oslib.c
+       - bcopy: update function declaration to add `const'
index 303e1f0c51b15bed4261ecd1b73b4f1cb0148df5..fd715c7d6d451c75808d1a737321d608807de45a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
    
@@ -397,9 +397,10 @@ PARSE_SUBBRACKET (CHAR *p, int flags)
 static CHAR *
 BRACKMATCH (CHAR *p, U_CHAR test, int flags)
 {
-  register CHAR cstart, cend, c;
-  register int not;    /* Nonzero if the sense of the character class is inverted.  */
-  int forcecoll, isrange;
+  CHAR c;
+  INT cstart, cend;
+  int not;    /* Nonzero if the sense of the character class is inverted.  */
+  int forcecoll;
   INT pc;
   CHAR *savep;
   CHAR *close;
@@ -417,13 +418,13 @@ BRACKMATCH (CHAR *p, U_CHAR test, int flags)
   if (not = (*p == L('!') || *p == L('^')))
     ++p;
 
-  c = *p++;
   for (;;)
     {
-      /* Initialize cstart and cend in case `-' is the last
-        character of the pattern. */
-      cstart = cend = c;
-      forcecoll = 0;
+      c = *p++;
+
+      /* `]' ends the bracket expression, unless it is the first character. */
+      if (c == L(']') && (p > savep + not + 1))
+       break;
 
       /* POSIX.2 equivalence class:  [=c=].  See POSIX.2 2.8.3.2.  Find
         the end of the equivalence class, move the pattern pointer past
@@ -432,28 +433,15 @@ BRACKMATCH (CHAR *p, U_CHAR test, int flags)
        {
          p++;
          pc = COLLSYM (p, close - p);
-         pc = FOLD (pc);
          p = close + 2;
 
-         if (COLLEQUIV (test, pc))
-           {
-/*[*/        /* Move past the closing `]', since the first thing we do at
-                the `matched:' label is back p up one. */
-             p++;
-             goto matched;
-           }
+         if (pc != INVALID && COLLEQUIV (test, FOLD (pc)))
+           goto matched;
+
          else
-           {
-             c = *p++;
-             if (c == L('\0'))
-               return ((test == L('[')) ? savep : (CHAR *)0); /*]*/
-             else if (c == L('/') && (flags & FNM_PATHNAME))
-               return ((test == L('[')) ? savep : (CHAR *)0); /*]*/
-             else if (c == L(']'))
-               break;
-             c = FOLD (c);
-             continue;
-           }
+           /* Continue the loop here, since this expression can't be
+              the first part of a range expression. */
+           continue;
        }
 
       /* POSIX.2 character class expression.  See POSIX.2 2.8.3.2. */
@@ -490,26 +478,11 @@ BRACKMATCH (CHAR *p, U_CHAR test, int flags)
          p = close + 2;
 
          if (pc)
-           {
-/*[*/        /* Move past the closing `]', since the first thing we do at
-                the `matched:' label is back p up one. */
-             p++;
-             goto matched;
-           }
+           goto matched;
          else
-           {
-             /* continue the loop here, since this expression can't be
-                the first part of a range expression. */
-             c = *p++;
-             if (c == L('\0'))
-               return ((test == L('[')) ? savep : (CHAR *)0);
-             else if (c == L('/') && (flags & FNM_PATHNAME))
-               return ((test == L('[')) ? savep : (CHAR *)0); /*]*/
-             else if (c == L(']'))
-               break;
-             c = FOLD (c);
-             continue;
-           }
+           /* Continue the loop here, since this expression can't be
+              the first part of a range expression. */
+           continue;
        }
  
       /* POSIX.2 collating symbols.  See POSIX.2 2.8.3.2.  Find the end of
@@ -523,105 +496,92 @@ BRACKMATCH (CHAR *p, U_CHAR test, int flags)
          p = close + 2;
          forcecoll = 1;
        }
-
-      if (!(flags & FNM_NOESCAPE) && c == L('\\'))
+      else
        {
-         if (*p == '\0')
-           return ((test == L('[')) ? savep : (CHAR *)0);
-         else if (*p == L('/') && (flags & FNM_PATHNAME))
+         if ((flags & FNM_NOESCAPE) == 0 && c == L('\\'))
+           c = *p++;
+
+         /* POSIX.2 2.8.3.1.2 says: `An expression containing a `[' that
+            is not preceded by a backslash and is not part of a bracket
+            expression produces undefined results.'  This implementation
+            treats the `[' as just a character to be matched if there is
+            not a closing `]'. */
+         if (c == L('\0'))
            return ((test == L('[')) ? savep : (CHAR *)0);
-         cstart = cend = *p++;
-       }
 
-      cstart = cend = FOLD (cstart);
-      isrange = 0;
-
-      /* POSIX.2 2.8.3.1.2 says: `An expression containing a `[' that
-        is not preceded by a backslash and is not part of a bracket
-        expression produces undefined results.'  This implementation
-        treats the `[' as just a character to be matched if there is
-        not a closing `]'. */
-      if (c == L('\0'))
-       return ((test == L('[')) ? savep : (CHAR *)0);
-
-      /* POSIX.2 2.13.3 says: `If a <slash> character is found following an
-         unescaped <left-square-bracket> character before a corresponding
-         <right-square-bracket> is found, the open bracket shall be treated
-         as an ordinary character.' If we find a slash in a bracket
-         expression and the flags indicate we're supposed to be treating the
-         string like a pathname, we have to treat the `[' as just a character
-         to be matched. */
-      if (c == L('/') && (flags & FNM_PATHNAME))
-       return ((test == L('[')) ? savep : (CHAR *)0);
-
-      c = *p++;
-      c = FOLD (c);
+         /* POSIX.2 2.13.3 says: `If a <slash> character is found following an
+            unescaped <left-square-bracket> character before a corresponding
+            <right-square-bracket> is found, the open bracket shall be treated
+            as an ordinary character.' If we find a slash in a bracket
+            expression and the flags indicate we're supposed to be treating the
+            string like a pathname, we have to treat the `[' as just a character
+            to be matched. */
+         if (c == L('/') && (flags & FNM_PATHNAME))
+           return ((test == L('[')) ? savep : (CHAR *)0);
 
-      if (c == L('\0'))
-       return ((test == L('[')) ? savep : (CHAR *)0);
-      else if (c == L('/') && (flags & FNM_PATHNAME))
-       return ((test == L('[')) ? savep : (CHAR *)0);
+         cstart = c;
+         forcecoll = 0;
+       }
 
-      /* This introduces a range, unless the `-' is the last
-        character of the class.  Find the end of the range
-        and move past it. */
-      if (c == L('-') && *p != L(']'))
+      /* Range expression, unless `-' is followed by a `]' or an equivalence
+        class or a character class.  POSIX.1-2024 9.3.5.7 says: ``The starting
+        range point and the ending range point shall be a collating element or
+        collating symbol. An equivalence class expression used as a starting
+        or ending point of a range expression produces unspecified results.''
+        We treat the `-' in `a-[=c=]' as matching itself to be consistent with
+        how we handled `[=c=]' above. */
+      if (p[0] == L('-') && p[1] != L(']') &&
+         !(p[1] == L('[') && (p[2] == L('=') || p[2] == L(':')) && PARSE_SUBBRACKET (p + 2, flags) != NULL))
        {
-         cend = *p++;
-         if (!(flags & FNM_NOESCAPE) && cend == L('\\'))
-           cend = *p++;
-         if (cend == L('\0'))
-           return ((test == L('[')) ? savep : (CHAR *)0);
-         else if (cend == L('/') && (flags & FNM_PATHNAME))
-           return ((test == L('[')) ? savep : (CHAR *)0);
-         if (cend == L('[') && *p == L('.') && (close = PARSE_SUBBRACKET (p, flags)) != NULL)
+         p++;          /* step over `-' */
+         c = *p++;
+         if (c == L('[') && *p == L('.') && (close = PARSE_SUBBRACKET (p, flags)) != NULL)
            {
              p++;
              cend = COLLSYM (p, close - p);
              p = close + 2;
              forcecoll = 1;
            }
-         cend = FOLD (cend);
+         else
+           {
+             if (!(flags & FNM_NOESCAPE) && c == L('\\'))
+               c = *p++;
+             if (c == L('\0'))
+               return ((test == L('[')) ? savep : (CHAR *)0);
+             else if (c == L('/') && (flags & FNM_PATHNAME))
+               return ((test == L('[')) ? savep : (CHAR *)0);
+             cend = c;
+           }
 
-         c = *p++;
+         /* A range with an invalid start or end matches nothing. */
+         if (cstart == INVALID || cend == INVALID)
+           continue;
 
+         cstart = FOLD (cstart);
+         cend = FOLD (cend);
          /* POSIX.2 2.8.3.2:  ``The ending range point shall collate
             equal to or higher than the starting range point; otherwise
             the expression shall be treated as invalid.''  Note that this
             applies to only the range expression; the rest of the bracket
             expression is still checked for matches. */
-         if (RANGECMP (cstart, cend, forcecoll) > 0)
-           {
-             if (c == L(']'))
-               break;
-             c = FOLD (c);
-             continue;
-           }
-         isrange = 1;
+         if (RANGECMP (cstart, cend, forcecoll) <= 0 &&
+             RANGECMP (test, cstart, forcecoll) >= 0 && RANGECMP (test, cend, forcecoll) <= 0)
+           goto matched;
+       }
+      else
+       {
+         /* Not a range. */
+         if (cstart != INVALID && test == FOLD (cstart))
+           goto matched;
        }
-
-      if (isrange == 0 && test == cstart)
-        goto matched;
-      if (isrange && RANGECMP (test, cstart, forcecoll) >= 0 && RANGECMP (test, cend, forcecoll) <= 0)
-       goto matched;
-
-      if (c == L(']'))
-       break;
     }
   /* No match. */
   return (!not ? (CHAR *)0 : p);
 
 matched:
   /* Skip the rest of the [...] that already matched.  */
-  c = *--p;
   while (1)
     {
-      /* A `[' without a matching `]' is just another character to match. */
-      if (c == L('\0'))
-       return ((test == L('[')) ? savep : (CHAR *)0);
-      else if (c == L('/') && (flags & FNM_PATHNAME))
-       return ((test == L('[')) ? savep : (CHAR *)0);
-
       c = *p++;
       if (c == L('[') && (*p == L('=') || *p == L(':') || *p == L('.')))
        {
@@ -637,15 +597,16 @@ matched:
          the bracket expression. */
       else if (c == L(']'))
        break;
-      else if (!(flags & FNM_NOESCAPE) && c == L('\\'))
+      else
        {
-         if (*p == '\0')
+         if (!(flags & FNM_NOESCAPE) && c == L('\\'))
+           c = *p++;
+         if (c == '\0')
            return ((test == L('[')) ? savep : (CHAR *)0);
          /* We don't allow backslash to quote slash if we're matching pathnames */
-         else if (*p == L('/') && (flags & FNM_PATHNAME))
+         else if (c == L('/') && (flags & FNM_PATHNAME))
            return ((test == L('[')) ? savep : (CHAR *)0);
          /* Posix issue 8 leaves this unspecified for the shell. */
-         ++p;
        }
     }
   return (not ? (CHAR *)0 : p);
index 3cb39808ea9517d202bfd6ee2d45fe5dac57efe0..f24bb87995195185e041ab048e9ee19930b31569 100644 (file)
@@ -161,7 +161,7 @@ getdtablesize (void)
 #    undef bcopy
 #  endif
 void
-bcopy (void *s, void *d, size_t n)
+bcopy (const void *s, void *d, size_t n)
 {
   FASTCOPY (s, d, n);
 }
index 4f4f001f00fd5dd3ec4059113b8ee2c5faf97ad4..4401d768482dda159c7da76fecb39c6cf29b8c99 100755 (executable)
@@ -10,6 +10,14 @@ export TMPDIR
 export BASH_TSTOUT=/tmp/xx
 rm -f ${BASH_TSTOUT}
 
+# keep track of passed and failed tests and report them
+if [ -t 1 ]; then
+        # can't rely on having $'...' or printf understanding \e
+        # bright red background, white foreground text
+        export CSTART=$(printf '\033[01;101;37m') CEND=$(printf '\033[0m')
+else
+        export CSTART= CEND=
+fi
 export TAB='   '
 
 ${THIS_SH} "$@"
index fdb80a7a14972851ac2087992be12e66122b51ff..cf19915f663ccb96660e74a2fdcc4365fa5242a6 100644 (file)
@@ -20,7 +20,7 @@ intmax_min2=$((-2**63))
 
 case $intmax_max in
 9223372036854775807)   ;;
-*)             echo "warning: your machine does not support 64-bit arithmetic using intmax_t" 2>&1 ;;
+*)             echo "${CSTART}warning${CEND}: your machine does not support 64-bit arithmetic using intmax_t" 2>&1 ;;
 esac
 
 # these are actually the same
diff --git a/tests/conv-warnings b/tests/conv-warnings
new file mode 100644 (file)
index 0000000..2cdd25a
--- /dev/null
@@ -0,0 +1,4 @@
+for f ; do
+       echo $f
+       sed 's|warning:|${CSTART}warning${CEND}:|' < $f > zzz && mv zzz $f
+done
index 7c795c98e2eec7684a3c8ccd84b8e0fe5fc1c2f8..8f79387f4f5bc9941e8323e4f6edd2c4a561b1a9 100644 (file)
@@ -15,8 +15,8 @@
 
 # this locale causes problems all over the place
 if [ -z "$ZH_LOCALE" ]; then
-        echo "glob2.sub: warning: you do not have the zh_TW.big5 locale installed;" >&2
-        echo "glob2.sub: warning: that may cause some of these tests to fail." >&2
+        echo "${CSTART}glob2.sub: warning${CEND}: you do not have the zh_TW.big5 locale installed;" >&2
+        echo "${TAB}glob2.sub: that may cause some of these tests to fail." >&2
        ZH_LOCALE=$ZH_DEFAULT
 fi
 
index 2f3236e67874f9e706eb156b86250a8e2ab127ec..2b8e3da358859e157246368bb8e117581af76590 100644 (file)
@@ -16,8 +16,8 @@ unset LC_ALL LC_NUMERIC
 if locale -a | grep -i '^de_DE\.UTF.*8' >/dev/null ; then
        export LANG=de_DE.UTF-8
 else
-       echo "intl2.sub: warning: you do not have the de_DE.UTF-8 locale installed;" >&2
-       echo "intl2.sub: that will cause some of these tests to fail." >&2
+       echo "${CSTART}intl2.sub: warning${CEND}: you do not have the de_DE.UTF-8 locale installed;" >&2
+       echo "${TAB}intl2.sub: that will cause some of these tests to fail." >&2
 fi
 
 printf '%.4f\n' 1
index 6201f7b1be3a75123912ded1235a5fce455f6cfa..184c1a6a4a12686e2a325ded7ce8a50821e12ddc 100644 (file)
@@ -68,6 +68,7 @@ if [ -t 1 ]; then
 else
        CSTART= CEND=
 fi
+export CSTART CEND
 
 passed=0
 total=0
index 5de82916f3ebe2f113c08b4037487edb23cbc9a5..16b2ffb8b6e345001701db99f3d29451af46549b 100644 (file)
@@ -1,6 +1,6 @@
-echo "warning: all of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell" >&2
-echo "warning: the BASH_ARGC and BASH_ARGV tests will fail if debugging" >&2
+echo "${CSTART}warning${CEND}: the BASH_ARGC and BASH_ARGV tests will fail if debugging" >&2
 echo "${TAB}support has not been compiled into the shell" >&2
 ${THIS_SH} ./array.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} array.right && rm -f ${BASH_TSTOUT}
index e0fe49b25a42a8d273af1ffdd02232e6b72bb88e..f436f5f9b6835bf6d08978779af093d3b0ffffc1 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: all of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell" >&2
 ${THIS_SH} ./array-at-star > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} array2.right && rm -f ${BASH_TSTOUT}
index d840e72a253b0dab8aceb9d07963398467538188..5f6244e578ba2c87319a7690d743917b5a426155 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: all of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell" >&2
 ${THIS_SH} ./assoc.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} assoc.right && rm -f ${BASH_TSTOUT}
index 0ee115a1993afd5490e914691ac32fd5a70b1637..eba25f1a95dcdd802e7d5b5604030f47b27e1559 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: some of these tests may fail if process substitution has not" >&2
+echo "${CSTART}warning${CEND}: some of these tests may fail if process substitution has not" >&2
 echo "${TAB}been compiled into the shell or if the OS does not provide" >&2
 echo "${TAB}/dev/fd." >&2
 
index afa0f14bb15b7af5d2bb2f7f199a358102c19884..1ffd5b4036b8ae0f6444e66ddde6f6c62737e823 100644 (file)
@@ -1,8 +1,8 @@
-echo "warning: all of these tests will fail if the conditional command has not" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if the conditional command has not" >&2
 echo "${TAB}been compiled into the shell" >&2
-echo "warning: some of these tests will fail if extended pattern matching has not" >&2
+echo "${CSTART}warning${CEND}: some of these tests will fail if extended pattern matching has not" >&2
 echo "${TAB}been compiled into the shell" >&2
-echo "warning: the text of system error messages may vary between systems and" >&2
+echo "${CSTART}warning${CEND}: the text of system error messages may vary between systems and" >&2
 echo "${TAB}produce diff output." >&2
 
 ${THIS_SH} ./cond.tests > ${BASH_TSTOUT} 2>&1
index 55c95392d117152b618b0bff36329e3b9771402b..7be428da04e779387ae2552e24d3ff01e526b556 100644 (file)
 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-echo "warning: the text of a system error message may vary between systems and" >&2
+echo "${CSTART}warning${CEND}: the text of a system error message may vary between systems and" >&2
 echo "${TAB}produce diff output." >&2
 echo "${TAB}if the text of the error messages concerning \`notthere' or" >&2
 echo "${TAB}\`/tmp/bash-notthere' not being found or \`/' being a directory" >&2
 echo "${TAB}produce diff output, please do not consider this a test failure" >&2
-echo "warning: if diff output differing only in the location of the bash" >&2
+echo "${CSTART}warning${CEND}: if diff output differing only in the location of the bash" >&2
 echo "${TAB}binary appears, please do not consider this a test failure" >&2
 ${THIS_SH} ./execscript > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} exec.right && rm -f ${BASH_TSTOUT}
index aa8c8b120123a3767b3273041a4174cea9703153..ad37489bdc1f881e7a72062f3aa085cd16ac6313 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: if you have exported functions defined in your environment," >&2
+echo "${CSTART}warning${CEND}: if you have exported functions defined in your environment," >&2
 echo "${TAB}they may show up as diff output." >&2
 echo "${TAB}If so, please do not consider this a test failure" >&2
 ${THIS_SH} ./func.tests > ${BASH_TSTOUT} 2>&1
index 80c98ac1f4cca2bac000f1710c5176289b15c341..d3715e16ac3d93601ad7e7fec48c8581c9c5826e 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: UNIX versions number signals and schedule processes differently." >&2
+echo "${CSTART}warning${CEND}: UNIX versions number signals and schedule processes differently." >&2
 echo "${TAB}If output differing only in line numbers is produced, please" >&2
 echo "${TAB}do not consider this a test failure." >&2
 
index 3618c2bc952fd8628f3002b61d92f10146ba3321..f6a553b8dd8275fcac301f55cac2543b6c62ba05 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: all of these tests will fail if history has not been compiled" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if history has not been compiled" >&2
 echo "${TAB}into the shell" >&2
 ${THIS_SH} ./histexp.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} histexp.right && rm -f ${BASH_TSTOUT}
index 9334fd7f36992cc5b437c7281d487db6bdef855d..d1a5fbf8a1ee397bbd3acbb715e7a2f6873aa156 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: all of these tests will fail if history has not been compiled" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if history has not been compiled" >&2
 echo "${TAB}into the shell" >&2
 ${THIS_SH} ./history.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} history.right && rm -f ${BASH_TSTOUT}
index 3d442973254c6a7bc880ac78911e1ab781e72537..e5f5b7060e870899bc793aec0a969d82534bbabf 100644 (file)
@@ -1,6 +1,6 @@
-echo "warning: some of these tests may fail if job control has not been compiled" >&2
+echo "${CSTART}warning${CEND}: some of these tests may fail if job control has not been compiled" >&2
 echo "${TAB}into the shell" >&2
-echo "warning: there may be a message regarding a cat process dying due to a" >&2
+echo "${CSTART}warning${CEND}: there may be a message regarding a cat process dying due to a" >&2
 echo "${TAB}SIGHUP. Please disregard." >&2
 
 ${THIS_SH} ./jobs.tests > ${BASH_TSTOUT} 2>&1
index 0d851b8c842d50f30d8f2353d0a36ee7a4849752..cae0a339514e19514ad34956ac423be455401228 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: some of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: some of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell" >&2
 ${THIS_SH} ./nameref.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} nameref.right && rm -f ${BASH_TSTOUT}
index 15774e5b6659c34b2de9956d4e6dbe214cb2fdd1..24ff2e9863a2e1ab4b0b29d3ad3e48dfb90717a9 100644 (file)
@@ -1,8 +1,8 @@
-echo "warning: two of these tests will fail if your OS does not support" >&2
+echo "${CSTART}warning${CEND}: two of these tests will fail if your OS does not support" >&2
 echo "${TAB}named pipes or the /dev/fd filesystem.  If the tests of the" >&2
 echo "${TAB}process substitution mechanism fail, please do not consider" >&2
 echo "${TAB}this a test failure" >&2
-echo "warning: if you have exported variables beginning with the string _Q," >&2
+echo "${CSTART}warning${CEND}: if you have exported variables beginning with the string _Q," >&2
 echo "${TAB}the tests may generate diff output. If so, please do not consider" >&2
 echo "${TAB}this a test failure" >&2
 
index 6dd880a8db2acab731bf898d494f69f6215e0c96..4c2ba7a3bc28f9158e7584c16a0cec1f3d281ba5 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: several of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: several of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell." >&2
 ${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
 diff ${BASH_TSTOUT} nquote1.right && rm -f ${BASH_TSTOUT}
index f744445ea799a212987d8150b150f1d54ab7776d..770a8467c373be56f47b14768ccfd3e36cff2970 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: several of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: several of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell." >&2
 ${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
 diff ${BASH_TSTOUT} nquote2.right && rm -f ${BASH_TSTOUT}
index f96f45ee5c65309189d078b9b665ab0323821032..4bc357af6068968208634b6ee6d503d45368ae1f 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: several of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: several of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell." >&2
 ${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
 diff ${BASH_TSTOUT} nquote3.right && rm -f ${BASH_TSTOUT}
index 07b083c7aa1c1666c9b450aba33a74df1ab6bb8c..7c1b3c49293623e8e71580baafe67e513bb5c18d 100644 (file)
@@ -1,7 +1,7 @@
 # See whether or not we can use `diff -a'
 ( diff -a ./nquote4.right ./nquote4.right >/dev/null 2>&1 ) && AFLAG=-a
 
-echo "warning: some of these tests will fail if you do not have UTF-8" >&2
+echo "${CSTART}warning${CEND}: some of these tests will fail if you do not have UTF-8" >&2
 echo "${TAB}locales installed on your system" >&2
 
 ${THIS_SH} ./nquote4.tests > ${BASH_TSTOUT} 2>&1
index c15d8002d0c1cfa9186b6be0f20b7c7cdd837b36..92e4675913b7104f247a9f3b1cbe115b47ad59a3 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: all of these tests will fail if process substitution has not" >&2
+echo "${CSTART}warning${CEND}: all of these tests will fail if process substitution has not" >&2
 echo "${TAB}been compiled into the shell or if the OS does not provide" >&2
 echo "${TAB}FIFOs or /dev/fd. Some tests may fail if the OS does not" >&2
 echo "${TAB}provide FIFOs." >&2
index 43746092a2c4a58943343c235b1fe7bb948d7224..15f268c670c393d8718822a8b7b851d8b91e2717 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: please do not consider output differing only in the amount of" >&2
+echo "${CSTART}warning${CEND}: please do not consider output differing only in the amount of" >&2
 echo "${TAB}white space to be an error." >&2
 ${THIS_SH} ./read.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT}
index 04da6dd106deb4239a50563f66ba5bfce1cb6827..aed7608c45cecb41fcac9752974887cfde7ff30c 100644 (file)
@@ -1,6 +1,6 @@
-echo "warning: the text of a system error message may vary between systems and" >&2
+echo "${CSTART}warning${CEND}: the text of a system error message may vary between systems and" >&2
 echo "${TAB}produce diff output." >&2
-echo "warning: if the text of an error message concerning \`redir1.*' not being" >&2
+echo "${CSTART}warning${CEND}: if the text of an error message concerning \`redir1.*' not being" >&2
 echo "${TAB}found or messages concerning bad file descriptors produce diff" >&2
 echo "${TAB}output, please do not consider it a test failure" >&2
 ${THIS_SH} ./redir.tests > ${BASH_TSTOUT} 2>&1
index cfffd4328004a974788f3a0de9fc7ba0aba959d7..a91e4bd40a3b819f18e1b860a28fd75137690985 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: UNIX versions number signals and schedule processes differently." >&2
+echo "${CSTART}warning${CEND}: UNIX versions number signals and schedule processes differently." >&2
 echo "${TAB}If output differing only in line numbers is produced, please" >&2
 echo "${TAB}do not consider this a test failure." >&2
 
index 270deba7a75dfcb4a494527f2dac75324112cd75..5c974dba07e73179602506cd193f1926a7a87aa8 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: some of these tests will fail if arrays have not" >&2
+echo "${CSTART}warning${CEND}: some of these tests will fail if arrays have not" >&2
 echo "${TAB}been compiled into the shell" >&2
 ${THIS_SH} ./varenv.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT}
 diff ${BASH_TSTOUT} varenv.right && rm -f ${BASH_TSTOUT}
index 0a4d88b32388544ccc4a783950ae0a8d01898a6c..f800b176d878fe3ebe4b45243dafa798682de8c2 100644 (file)
@@ -1,4 +1,4 @@
-echo "warning: the text of a system error message may vary between systems and" >&2
+echo "${CSTART}warning${CEND}: the text of a system error message may vary between systems and" >&2
 echo "${TAB}produce diff output." >&2
 ${THIS_SH} ./vredir.tests > ${BASH_TSTOUT} 2>&1
 diff ${BASH_TSTOUT} vredir.right && rm -f ${BASH_TSTOUT}
index a1da45a1618dac7e363d4f36c1b2df6f344c137b..feb79d01574a9dea3eecf754f74fa8d2fc4a15ca 100644 (file)
@@ -23,8 +23,8 @@ TestCnt=0
 
 localewarn()
 {
-       echo "unicode1.sub: warning: you do not have the $1 locale installed;" >&2
-       echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
+       echo "${CSTART}unicode1.sub: warning${CEND}: you do not have the $1 locale installed;" >&2
+       echo "${TAB}that will cause some of these tests to be skipped." >&2
 }
 
 function TestCodePage {