Bash-4.2 cleanup of leftover files
This commit is contained in:
parent
495aee441b
commit
4692bbe418
13 changed files with 0 additions and 38115 deletions
31473
autom4te.cache/output.0
31473
autom4te.cache/output.0
File diff suppressed because it is too large
Load diff
|
|
@ -1,67 +0,0 @@
|
||||||
# This file was generated.
|
|
||||||
# It contains the lists of macros which have been traced.
|
|
||||||
# It can be safely removed.
|
|
||||||
|
|
||||||
@request = (
|
|
||||||
bless( [
|
|
||||||
'0',
|
|
||||||
1,
|
|
||||||
[
|
|
||||||
'/sw/share/autoconf'
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'/sw/share/autoconf/autoconf/autoconf.m4f',
|
|
||||||
'aclocal.m4',
|
|
||||||
'configure.in'
|
|
||||||
],
|
|
||||||
{
|
|
||||||
'_LT_AC_TAGCONFIG' => 1,
|
|
||||||
'AM_PROG_F77_C_O' => 1,
|
|
||||||
'AC_INIT' => 1,
|
|
||||||
'm4_pattern_forbid' => 1,
|
|
||||||
'_AM_COND_IF' => 1,
|
|
||||||
'AC_CANONICAL_TARGET' => 1,
|
|
||||||
'AC_SUBST' => 1,
|
|
||||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
|
||||||
'AC_FC_SRCEXT' => 1,
|
|
||||||
'AC_CANONICAL_HOST' => 1,
|
|
||||||
'AC_PROG_LIBTOOL' => 1,
|
|
||||||
'AM_INIT_AUTOMAKE' => 1,
|
|
||||||
'AC_CONFIG_SUBDIRS' => 1,
|
|
||||||
'AM_AUTOMAKE_VERSION' => 1,
|
|
||||||
'LT_CONFIG_LTDL_DIR' => 1,
|
|
||||||
'AC_REQUIRE_AUX_FILE' => 1,
|
|
||||||
'AC_CONFIG_LINKS' => 1,
|
|
||||||
'm4_sinclude' => 1,
|
|
||||||
'LT_SUPPORTED_TAG' => 1,
|
|
||||||
'AM_MAINTAINER_MODE' => 1,
|
|
||||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
|
||||||
'_m4_warn' => 1,
|
|
||||||
'AM_PROG_CXX_C_O' => 1,
|
|
||||||
'_AM_COND_ENDIF' => 1,
|
|
||||||
'AM_ENABLE_MULTILIB' => 1,
|
|
||||||
'AC_CONFIG_FILES' => 1,
|
|
||||||
'include' => 1,
|
|
||||||
'LT_INIT' => 1,
|
|
||||||
'AM_GNU_GETTEXT' => 1,
|
|
||||||
'AC_LIBSOURCE' => 1,
|
|
||||||
'AM_PROG_FC_C_O' => 1,
|
|
||||||
'AC_CANONICAL_BUILD' => 1,
|
|
||||||
'AC_FC_FREEFORM' => 1,
|
|
||||||
'AH_OUTPUT' => 1,
|
|
||||||
'_AM_SUBST_NOTMAKE' => 1,
|
|
||||||
'AC_CONFIG_AUX_DIR' => 1,
|
|
||||||
'sinclude' => 1,
|
|
||||||
'm4_pattern_allow' => 1,
|
|
||||||
'AM_PROG_CC_C_O' => 1,
|
|
||||||
'AC_CANONICAL_SYSTEM' => 1,
|
|
||||||
'AM_CONDITIONAL' => 1,
|
|
||||||
'AC_CONFIG_HEADERS' => 1,
|
|
||||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
|
||||||
'm4_include' => 1,
|
|
||||||
'_AM_COND_ELSE' => 1,
|
|
||||||
'AC_SUBST_TRACE' => 1
|
|
||||||
}
|
|
||||||
], 'Autom4te::Request' )
|
|
||||||
);
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
1145
configure.in.bash40
1145
configure.in.bash40
File diff suppressed because it is too large
Load diff
1145
configure.in.orig
1145
configure.in.orig
File diff suppressed because it is too large
Load diff
1145
configure.in.save
1145
configure.in.save
File diff suppressed because it is too large
Load diff
|
|
@ -1,70 +0,0 @@
|
||||||
/* fdprintf -- printf to a file descriptor */
|
|
||||||
|
|
||||||
/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GNU Bash, the Bourne Again SHell.
|
|
||||||
|
|
||||||
Bash is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Bash is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdc.h>
|
|
||||||
|
|
||||||
#if defined (HAVE_UNISTD_H)
|
|
||||||
# include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (PREFER_STDARG)
|
|
||||||
# include <stdarg.h>
|
|
||||||
#else
|
|
||||||
# include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
#if defined (PREFER_STDARG)
|
|
||||||
fdprintf(int fd, const char *format, ...)
|
|
||||||
#else
|
|
||||||
fdprintf(fd, format, va_alist)
|
|
||||||
int fd;
|
|
||||||
const char *format;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
FILE *fp;
|
|
||||||
int fd2, rc, r2;
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
if ((fd2 = dup(fd)) < 0)
|
|
||||||
return -1;
|
|
||||||
fp = fdopen (fd2, "w");
|
|
||||||
if (fp == 0)
|
|
||||||
{
|
|
||||||
close (fd2);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
SH_VA_START (args, format);
|
|
||||||
rc = vfprintf (fp, format, args);
|
|
||||||
fflush (fp);
|
|
||||||
va_end (args);
|
|
||||||
|
|
||||||
r2 = fclose (fp); /* check here */
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
/* strindex.c - Find if one string appears as a substring of another string,
|
|
||||||
without regard to case. */
|
|
||||||
|
|
||||||
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GNU Bash, the Bourne Again SHell.
|
|
||||||
|
|
||||||
Bash is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Bash is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <bashansi.h>
|
|
||||||
#include <chartypes.h>
|
|
||||||
|
|
||||||
#include <stdc.h>
|
|
||||||
|
|
||||||
/* Determine if s2 occurs in s1. If so, return a pointer to the
|
|
||||||
match in s1. The compare is case insensitive. This is a
|
|
||||||
case-insensitive strstr(3). */
|
|
||||||
char *
|
|
||||||
strindex (s1, s2)
|
|
||||||
const char *s1;
|
|
||||||
const char *s2;
|
|
||||||
{
|
|
||||||
register int i, l, len, c;
|
|
||||||
|
|
||||||
c = TOLOWER ((unsigned char)s2[0]);
|
|
||||||
len = strlen (s1);
|
|
||||||
l = strlen (s2);
|
|
||||||
for (i = 0; (len - i) >= l; i++)
|
|
||||||
if ((TOLOWER ((unsigned char)s1[i]) == c) && (strncasecmp (s1 + i, s2, l) == 0))
|
|
||||||
return ((char *)s1 + i);
|
|
||||||
return ((char *)0);
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
/* xstrchr.c - strchr(3) that handles multibyte characters. */
|
|
||||||
|
|
||||||
/* Copyright (C) 2002 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GNU Bash, the Bourne Again SHell.
|
|
||||||
|
|
||||||
Bash is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Bash is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_STDLIB_H
|
|
||||||
# include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "bashansi.h"
|
|
||||||
#include "shmbutil.h"
|
|
||||||
|
|
||||||
#undef xstrchr
|
|
||||||
|
|
||||||
/* In some locales, the non-first byte of some multibyte characters have
|
|
||||||
the same value as some ascii character. Faced with these strings, a
|
|
||||||
legacy strchr() might return the wrong value. */
|
|
||||||
|
|
||||||
char *
|
|
||||||
#if defined (PROTOTYPES)
|
|
||||||
xstrchr (const char *s, int c)
|
|
||||||
#else
|
|
||||||
xstrchr (s, c)
|
|
||||||
const char *s;
|
|
||||||
int c;
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
#if HANDLE_MULTIBYTE
|
|
||||||
char *pos;
|
|
||||||
mbstate_t state;
|
|
||||||
size_t strlength, mblength;
|
|
||||||
|
|
||||||
/* The locale encodings with said weird property are BIG5, BIG5-HKSCS,
|
|
||||||
GBK, GB18030, SHIFT_JIS, and JOHAB. They exhibit the problem only
|
|
||||||
when c >= 0x30. We can therefore use the faster bytewise search if
|
|
||||||
c <= 0x30. */
|
|
||||||
if ((unsigned char)c >= '0' && MB_CUR_MAX > 1)
|
|
||||||
{
|
|
||||||
pos = (char *)s;
|
|
||||||
memset (&state, '\0', sizeof(mbstate_t));
|
|
||||||
strlength = strlen (s);
|
|
||||||
|
|
||||||
while (strlength > 0)
|
|
||||||
{
|
|
||||||
mblength = mbrlen (pos, strlength, &state);
|
|
||||||
if (mblength == (size_t)-2 || mblength == (size_t)-1 || mblength == (size_t)0)
|
|
||||||
mblength = 1;
|
|
||||||
|
|
||||||
if (c == (unsigned char)*pos)
|
|
||||||
return pos;
|
|
||||||
|
|
||||||
strlength -= mblength;
|
|
||||||
pos += mblength;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ((char *)NULL);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return (strchr (s, c));
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
***************
|
|
||||||
*** 26,30 ****
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 36
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
--- 26,30 ----
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
! #define PATCHLEVEL 37
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
/* patchlevel.h -- current bash patch level */
|
|
||||||
|
|
||||||
/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GNU Bash, the Bourne Again SHell.
|
|
||||||
|
|
||||||
Bash is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
Bash is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined (_PATCHLEVEL_H_)
|
|
||||||
#define _PATCHLEVEL_H_
|
|
||||||
|
|
||||||
/* It's important that there be no other strings in this file that match the
|
|
||||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
|
||||||
looks for to find the patch level (for the sccs version string). */
|
|
||||||
|
|
||||||
#define PATCHLEVEL 37
|
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
|
||||||
BIN
po/._lt.po
BIN
po/._lt.po
Binary file not shown.
388
tests/glob-test
388
tests/glob-test
|
|
@ -1,388 +0,0 @@
|
||||||
LC_COLLATE=C
|
|
||||||
#
|
|
||||||
# test the shell globbing
|
|
||||||
#
|
|
||||||
expect()
|
|
||||||
{
|
|
||||||
echo expect "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# First, a test that bash-2.01.1 fails
|
|
||||||
${THIS_SH} ./glob1.sub
|
|
||||||
|
|
||||||
MYDIR=$PWD # save where we are
|
|
||||||
|
|
||||||
TESTDIR=/tmp/glob-test
|
|
||||||
mkdir $TESTDIR
|
|
||||||
builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
|
|
||||||
rm -rf *
|
|
||||||
|
|
||||||
touch a b c d abc abd abe bb bcd ca cb dd de Beware
|
|
||||||
mkdir bdir
|
|
||||||
|
|
||||||
# see if `regular' globbing works right
|
|
||||||
expect '<a> <abc> <abd> <abe> <X*>'
|
|
||||||
recho a* X*
|
|
||||||
|
|
||||||
expect '<a> <abc> <abd> <abe>'
|
|
||||||
recho \a*
|
|
||||||
|
|
||||||
# see if null glob expansion works
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
expect '<a> <abc> <abd> <abe>'
|
|
||||||
recho a* X*
|
|
||||||
|
|
||||||
shopt -u nullglob
|
|
||||||
|
|
||||||
# see if the failglob option works
|
|
||||||
|
|
||||||
mkdir tmp
|
|
||||||
touch tmp/l1 tmp/l2 tmp/l3
|
|
||||||
builtin echo tmp/l[12] tmp/*4 tmp/*3
|
|
||||||
shopt -s failglob
|
|
||||||
builtin echo tmp/l[12] tmp/*4 tmp/*3
|
|
||||||
rm -r tmp
|
|
||||||
shopt -u failglob
|
|
||||||
|
|
||||||
# see if the code that expands directories only works
|
|
||||||
expect '<bdir/>'
|
|
||||||
recho b*/
|
|
||||||
|
|
||||||
# Test quoted and unquoted globbing characters
|
|
||||||
expect '<*>'
|
|
||||||
recho \*
|
|
||||||
|
|
||||||
expect '<a*>'
|
|
||||||
recho 'a*'
|
|
||||||
|
|
||||||
expect '<a*>'
|
|
||||||
recho a\*
|
|
||||||
|
|
||||||
expect '<c> <ca> <cb> <a*> <*q*>'
|
|
||||||
recho c* a\* *q*
|
|
||||||
|
|
||||||
expect '<**>'
|
|
||||||
recho "*"*
|
|
||||||
|
|
||||||
expect '<**>'
|
|
||||||
recho \**
|
|
||||||
|
|
||||||
expect '<\.\./*/>'
|
|
||||||
recho "\.\./*/"
|
|
||||||
|
|
||||||
expect '<s/\..*//>'
|
|
||||||
recho 's/\..*//'
|
|
||||||
|
|
||||||
# Pattern from Larry Wall's Configure that caused bash to blow up
|
|
||||||
expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
|
|
||||||
recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
|
|
||||||
|
|
||||||
# Make sure character classes work properly
|
|
||||||
|
|
||||||
expect '<abc> <abd> <abe> <bb> <cb>'
|
|
||||||
recho [a-c]b*
|
|
||||||
|
|
||||||
expect '<abd> <abe> <bb> <bcd> <bdir> <ca> <cb> <dd> <de>'
|
|
||||||
recho [a-y]*[^c]
|
|
||||||
|
|
||||||
expect '<abd> <abe>'
|
|
||||||
recho a*[^c]
|
|
||||||
|
|
||||||
touch a-b aXb
|
|
||||||
expect '<a-b> <aXb>'
|
|
||||||
recho a[X-]b
|
|
||||||
|
|
||||||
touch .x .y
|
|
||||||
expect '<Beware> <d> <dd> <de>'
|
|
||||||
recho [^a-c]*
|
|
||||||
|
|
||||||
# Make sure that filenames with embedded globbing characters are handled
|
|
||||||
# properly
|
|
||||||
mkdir a\*b
|
|
||||||
> a\*b/ooo
|
|
||||||
|
|
||||||
expect '<a*b/ooo>'
|
|
||||||
recho a\*b/*
|
|
||||||
|
|
||||||
expect '<a*b/ooo>'
|
|
||||||
recho a\*?/*
|
|
||||||
|
|
||||||
expect '<no match>'
|
|
||||||
cmd='echo !7'
|
|
||||||
case "$cmd" in
|
|
||||||
*\\!*) echo match ;;
|
|
||||||
*) echo no match ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
expect '<not there>'
|
|
||||||
file='r.*'
|
|
||||||
case $file in
|
|
||||||
*.\*) echo not there ;;
|
|
||||||
*) echo there ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# examples from the Posix.2 spec (d11.2, p. 243)
|
|
||||||
expect '<abc>'
|
|
||||||
recho a[b]c
|
|
||||||
|
|
||||||
expect '<abc>'
|
|
||||||
recho a["b"]c
|
|
||||||
|
|
||||||
expect '<abc>'
|
|
||||||
recho a[\b]c
|
|
||||||
|
|
||||||
expect '<abc>'
|
|
||||||
recho a?c
|
|
||||||
|
|
||||||
expect '<match 1>'
|
|
||||||
case abc in
|
|
||||||
a"b"c) echo 'match 1' ;;
|
|
||||||
*) echo 'BAD match 1' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
expect '<match 2>'
|
|
||||||
case abc in
|
|
||||||
a*c) echo 'match 2' ;;
|
|
||||||
*) echo 'BAD match 2' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
expect '<ok 1>'
|
|
||||||
case abc in
|
|
||||||
"a?c") echo 'bad 1' ;;
|
|
||||||
*) echo 'ok 1' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
expect '<ok 2>'
|
|
||||||
case abc in
|
|
||||||
a\*c) echo 'bad 2' ;;
|
|
||||||
*) echo 'ok 2' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
expect '<ok 3>'
|
|
||||||
case abc in
|
|
||||||
a\[b]c) echo 'bad 3' ;;
|
|
||||||
*) echo 'ok 3' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
expect '<ok 4>'
|
|
||||||
case "$nosuchvar" in
|
|
||||||
"") echo 'ok 4' ;;
|
|
||||||
*) echo 'bad 4' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# This is very odd, but sh and ksh seem to agree
|
|
||||||
expect '<ok 5>'
|
|
||||||
case abc in
|
|
||||||
a["\b"]c) echo 'ok 5' ;;
|
|
||||||
*) echo 'bad 5' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
mkdir man
|
|
||||||
mkdir man/man1
|
|
||||||
touch man/man1/bash.1
|
|
||||||
expect '<man/man1/bash.1>'
|
|
||||||
recho */man*/bash.*
|
|
||||||
expect '<man/man1/bash.1>'
|
|
||||||
recho $(echo */man*/bash.*)
|
|
||||||
expect '<man/man1/bash.1>'
|
|
||||||
recho "$(echo */man*/bash.*)"
|
|
||||||
|
|
||||||
# tests with multiple `*'s
|
|
||||||
case abc in
|
|
||||||
a***c) echo ok 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
a*****?c) echo ok 2;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
?*****??) echo ok 3;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
*****??) echo ok 4;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
*****??c) echo ok 5;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
?*****?c) echo ok 6;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
?***?****c) echo ok 7;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
?***?****?) echo ok 8;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
?***?****) echo ok 9;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
*******c) echo ok 10;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
*******?) echo ok 11;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abcdecdhjk in
|
|
||||||
a*cd**?**??k) echo ok 20;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abcdecdhjk in
|
|
||||||
a**?**cd**?**??k) echo ok 21;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abcdecdhjk in
|
|
||||||
a**?**cd**?**??k***) echo ok 22;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abcdecdhjk in
|
|
||||||
a**?**cd**?**??***k) echo ok 23;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abcdecdhjk in
|
|
||||||
a**?**cd**?**??***k**) echo ok 24;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abcdecdhjk in
|
|
||||||
a****c**?**??*****) echo ok 25;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '-' in
|
|
||||||
[-abc]) echo ok 26 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '-' in
|
|
||||||
[abc-]) echo ok 27 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '\' in
|
|
||||||
\\) echo ok 28 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '\' in
|
|
||||||
[\\]) echo ok 29 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '\' in
|
|
||||||
'\') echo ok 30 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '[' in
|
|
||||||
[[]) echo ok 31 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# a `[' without a closing `]' is just another character to match, in the
|
|
||||||
# bash implementation
|
|
||||||
case '[' in
|
|
||||||
[) echo ok 32 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '[abc' in
|
|
||||||
[*) echo 'ok 33';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# a right bracket shall lose its special meaning and represent itself in
|
|
||||||
# a bracket expression if it occurs first in the list. -- POSIX.2 2.8.3.2
|
|
||||||
case ']' in
|
|
||||||
[]]) echo ok 34 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '-' in
|
|
||||||
[]-]) echo ok 35 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# a backslash should just escape the next character in this context
|
|
||||||
case p in
|
|
||||||
[a-\z]) echo ok 36 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# this was a bug in all versions up to bash-2.04-release
|
|
||||||
case "/tmp" in
|
|
||||||
[/\\]*) echo ok 37 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# none of these should output anything
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
??**********?****?) echo bad 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
??**********?****c) echo bad 2;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
?************c****?****) echo bad 3;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
*c*?**) echo bad 4;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
a*****c*?**) echo bad 5;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case abc in
|
|
||||||
a********???*******) echo bad 6;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case 'a' in
|
|
||||||
[]) echo bad 7 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case '[' in
|
|
||||||
[abc) echo bad 8;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# let's start testing the case-insensitive globbing code
|
|
||||||
recho b*
|
|
||||||
|
|
||||||
shopt -s nocaseglob
|
|
||||||
recho b*
|
|
||||||
|
|
||||||
recho [b]*
|
|
||||||
shopt -u nocaseglob
|
|
||||||
|
|
||||||
# make sure set -f works right
|
|
||||||
set -f
|
|
||||||
recho *
|
|
||||||
set +f
|
|
||||||
|
|
||||||
# test out the GLOBIGNORE code
|
|
||||||
GLOBIGNORE='.*:*c:*e:?'
|
|
||||||
recho *
|
|
||||||
|
|
||||||
GLOBIGNORE='.*:*b:*d:?'
|
|
||||||
recho *
|
|
||||||
|
|
||||||
# see if GLOBIGNORE can substitute for `set -f'
|
|
||||||
GLOBIGNORE='.*:*'
|
|
||||||
recho *
|
|
||||||
|
|
||||||
unset GLOBIGNORE
|
|
||||||
expect '<man/man1/bash.1>'
|
|
||||||
recho */man*/bash.*
|
|
||||||
|
|
||||||
# make sure null values for GLOBIGNORE have no effect
|
|
||||||
GLOBIGNORE=
|
|
||||||
expect '<man/man1/bash.1>'
|
|
||||||
recho */man*/bash.*
|
|
||||||
|
|
||||||
# this is for the benefit of pure coverage, so it writes the pcv file
|
|
||||||
# in the right place, and for gprof
|
|
||||||
builtin cd $MYDIR
|
|
||||||
|
|
||||||
rm -rf $TESTDIR
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue