summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/bug-regex10.c2
-rw-r--r--testsuite/bug-regex11.c2
-rw-r--r--testsuite/bug-regex12.c2
-rw-r--r--testsuite/bug-regex13.c2
-rw-r--r--testsuite/bug-regex14.c2
-rw-r--r--testsuite/bug-regex21.c2
-rw-r--r--testsuite/bug-regex27.c2
-rw-r--r--testsuite/bug-regex28.c2
-rw-r--r--testsuite/bug-regex7.c2
-rw-r--r--testsuite/bug-regex8.c2
-rw-r--r--testsuite/bug-regex9.c2
-rw-r--r--testsuite/cmd-R.sh2
-rwxr-xr-xtestsuite/cmd-l.sh2
-rwxr-xr-xtestsuite/colon-with-no-label.sh2
-rw-r--r--testsuite/comment-n.sh2
-rw-r--r--testsuite/compile-errors.sh2
-rw-r--r--testsuite/compile-tests.sh2
-rwxr-xr-xtestsuite/convert-number.sh2
-rw-r--r--testsuite/envvar-check2
-rw-r--r--testsuite/execute-tests.sh2
-rwxr-xr-xtestsuite/follow-symlinks-stdin.sh2
-rw-r--r--testsuite/follow-symlinks.sh2
-rw-r--r--testsuite/get-mb-cur-max.c2
-rwxr-xr-xtestsuite/help-version.sh2
-rwxr-xr-xtestsuite/in-place-hyphen.sh2
-rw-r--r--testsuite/in-place-suffix-backup.sh2
-rw-r--r--testsuite/init.sh94
-rwxr-xr-xtestsuite/invalid-mb-seq-UMR.sh2
-rw-r--r--testsuite/local.mk3
-rwxr-xr-xtestsuite/mb-bad-delim.sh2
-rwxr-xr-xtestsuite/mb-charclass-non-utf8.sh2
-rwxr-xr-xtestsuite/mb-match-slash.sh2
-rwxr-xr-xtestsuite/mb-y-translate.sh2
-rwxr-xr-xtestsuite/newline-dfa-bug.sh38
-rw-r--r--testsuite/normalize-text.sh2
-rwxr-xr-xtestsuite/nulldata.sh2
-rw-r--r--testsuite/panic-tests.sh2
-rw-r--r--testsuite/posix-char-class.sh2
-rwxr-xr-xtestsuite/posix-mode-N.sh2
-rw-r--r--testsuite/posix-mode-addr.sh2
-rwxr-xr-xtestsuite/posix-mode-bad-ref.sh2
-rw-r--r--testsuite/posix-mode-s.sh2
-rwxr-xr-xtestsuite/range-overlap.sh2
-rw-r--r--testsuite/recursive-escape-c.sh2
-rw-r--r--testsuite/regex-errors.sh2
-rw-r--r--testsuite/runptests.c2
-rwxr-xr-xtestsuite/sandbox.sh2
-rw-r--r--testsuite/stdin-prog.sh2
-rwxr-xr-xtestsuite/subst-mb-incomplete.sh2
-rw-r--r--testsuite/subst-options.sh2
-rw-r--r--testsuite/subst-replacement.sh2
-rwxr-xr-xtestsuite/temp-file-cleanup.sh2
-rw-r--r--testsuite/test-mbrtowc.c2
-rwxr-xr-xtestsuite/title-case.sh2
-rw-r--r--testsuite/tst-boost.c2
-rw-r--r--testsuite/tst-pcre.c2
-rw-r--r--testsuite/tst-rxspencer.c2
-rw-r--r--testsuite/unbuffered.sh2
-rw-r--r--testsuite/xemacs.good2
-rw-r--r--testsuite/xemacs.inp2
60 files changed, 140 insertions, 109 deletions
diff --git a/testsuite/bug-regex10.c b/testsuite/bug-regex10.c
index cdb0a46..d7b765a 100644
--- a/testsuite/bug-regex10.c
+++ b/testsuite/bug-regex10.c
@@ -1,5 +1,5 @@
/* Test for re_match with non-zero start.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
diff --git a/testsuite/bug-regex11.c b/testsuite/bug-regex11.c
index 22a4bb0..e02c982 100644
--- a/testsuite/bug-regex11.c
+++ b/testsuite/bug-regex11.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
diff --git a/testsuite/bug-regex12.c b/testsuite/bug-regex12.c
index 867e5fa..72e302c 100644
--- a/testsuite/bug-regex12.c
+++ b/testsuite/bug-regex12.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
diff --git a/testsuite/bug-regex13.c b/testsuite/bug-regex13.c
index d04f246..9a14b66 100644
--- a/testsuite/bug-regex13.c
+++ b/testsuite/bug-regex13.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
diff --git a/testsuite/bug-regex14.c b/testsuite/bug-regex14.c
index f20b183..e304fbc 100644
--- a/testsuite/bug-regex14.c
+++ b/testsuite/bug-regex14.c
@@ -1,5 +1,5 @@
/* Tests re_comp and re_exec.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
diff --git a/testsuite/bug-regex21.c b/testsuite/bug-regex21.c
index 53a975d..eaff92b 100644
--- a/testsuite/bug-regex21.c
+++ b/testsuite/bug-regex21.c
@@ -1,5 +1,5 @@
/* Test for memory leaks in regcomp.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/testsuite/bug-regex27.c b/testsuite/bug-regex27.c
index eb7ad5b..d6f6059 100644
--- a/testsuite/bug-regex27.c
+++ b/testsuite/bug-regex27.c
@@ -1,5 +1,5 @@
/* Test REG_NEWLINE.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
diff --git a/testsuite/bug-regex28.c b/testsuite/bug-regex28.c
index 42dadd3..3a4dbec 100644
--- a/testsuite/bug-regex28.c
+++ b/testsuite/bug-regex28.c
@@ -1,5 +1,5 @@
/* Test RE_HAT_LISTS_NOT_NEWLINE and RE_DOT_NEWLINE.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
diff --git a/testsuite/bug-regex7.c b/testsuite/bug-regex7.c
index 6f3e435..7a99dfc 100644
--- a/testsuite/bug-regex7.c
+++ b/testsuite/bug-regex7.c
@@ -1,5 +1,5 @@
/* Test for regs allocation in re_search and re_match.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
diff --git a/testsuite/bug-regex8.c b/testsuite/bug-regex8.c
index dfb27b8..f30341d 100644
--- a/testsuite/bug-regex8.c
+++ b/testsuite/bug-regex8.c
@@ -1,5 +1,5 @@
/* Test for the STOP parameter of re_match_2 and re_search_2.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
diff --git a/testsuite/bug-regex9.c b/testsuite/bug-regex9.c
index e4d41c1..7895215 100644
--- a/testsuite/bug-regex9.c
+++ b/testsuite/bug-regex9.c
@@ -1,5 +1,5 @@
/* Test for memory handling in regex.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
diff --git a/testsuite/cmd-R.sh b/testsuite/cmd-R.sh
index 55ed685..3f6da01 100644
--- a/testsuite/cmd-R.sh
+++ b/testsuite/cmd-R.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 'R' command
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/cmd-l.sh b/testsuite/cmd-l.sh
index 743e326..395b134 100755
--- a/testsuite/cmd-l.sh
+++ b/testsuite/cmd-l.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 'l' command with different widths
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/colon-with-no-label.sh b/testsuite/colon-with-no-label.sh
index 42de378..6b1c4ed 100755
--- a/testsuite/colon-with-no-label.sh
+++ b/testsuite/colon-with-no-label.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that a ":" command with no label is now rejected.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/comment-n.sh b/testsuite/comment-n.sh
index 240cf86..5496115 100644
--- a/testsuite/comment-n.sh
+++ b/testsuite/comment-n.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test the '#n' silent mode (activated by first line comment)
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/compile-errors.sh b/testsuite/compile-errors.sh
index 9e7414c..d8e2f88 100644
--- a/testsuite/compile-errors.sh
+++ b/testsuite/compile-errors.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test compilation errors
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/compile-tests.sh b/testsuite/compile-tests.sh
index d1117b4..b4d4256 100644
--- a/testsuite/compile-tests.sh
+++ b/testsuite/compile-tests.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test compilation less-common cases
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/convert-number.sh b/testsuite/convert-number.sh
index e80a23e..b9ceccb 100755
--- a/testsuite/convert-number.sh
+++ b/testsuite/convert-number.sh
@@ -2,7 +2,7 @@
# Test number conversion from escape sequences \xNN \oNNN \dNNN
# (compile.c:convert_number())
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/envvar-check b/testsuite/envvar-check
index ad672fa..4843d64 100644
--- a/testsuite/envvar-check
+++ b/testsuite/envvar-check
@@ -1,7 +1,7 @@
# -*- sh -*-
# Check environment variables for sane values while testing.
-# Copyright (C) 2000-2016 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/execute-tests.sh b/testsuite/execute-tests.sh
index 2075c6f..d5f7032 100644
--- a/testsuite/execute-tests.sh
+++ b/testsuite/execute-tests.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test execution less-common cases
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/follow-symlinks-stdin.sh b/testsuite/follow-symlinks-stdin.sh
index fc04fe9..000be6c 100755
--- a/testsuite/follow-symlinks-stdin.sh
+++ b/testsuite/follow-symlinks-stdin.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that --follow-symlinks does not break reading from stdin.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/follow-symlinks.sh b/testsuite/follow-symlinks.sh
index 09dde3f..5586eef 100644
--- a/testsuite/follow-symlinks.sh
+++ b/testsuite/follow-symlinks.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test --follow-symlinks option
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/get-mb-cur-max.c b/testsuite/get-mb-cur-max.c
index 403beb4..6be5137 100644
--- a/testsuite/get-mb-cur-max.c
+++ b/testsuite/get-mb-cur-max.c
@@ -1,5 +1,5 @@
/* Auxiliary program to detect support for a locale.
- Copyright 2010-2016 Free Software Foundation, Inc.
+ Copyright 2010-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/testsuite/help-version.sh b/testsuite/help-version.sh
index c93e51e..a0896ef 100755
--- a/testsuite/help-version.sh
+++ b/testsuite/help-version.sh
@@ -2,7 +2,7 @@
# Make sure all of these programs work properly
# when invoked with --help or --version.
-# Copyright (C) 2000-2016 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/in-place-hyphen.sh b/testsuite/in-place-hyphen.sh
index 8b6752e..c4dd8f9 100755
--- a/testsuite/in-place-hyphen.sh
+++ b/testsuite/in-place-hyphen.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Verify that "-" is treated as a file name with --in-place.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/in-place-suffix-backup.sh b/testsuite/in-place-suffix-backup.sh
index 6eaea82..1d239b4 100644
--- a/testsuite/in-place-suffix-backup.sh
+++ b/testsuite/in-place-suffix-backup.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test -i/--inplace with backup suffixes
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/init.sh b/testsuite/init.sh
index ee08022..584194f 100644
--- a/testsuite/init.sh
+++ b/testsuite/init.sh
@@ -1,6 +1,6 @@
# source this file; set up for tests
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -45,6 +45,9 @@
# Running a single test, with verbose output:
# $ make check TESTS=test-foo.sh VERBOSE=yes
#
+# Running a single test, keeping the temporary directory:
+# $ make check TESTS=test-foo.sh KEEP=yes
+#
# Running a single test, with single-stepping:
# 1. Go into a sub-shell:
# $ bash
@@ -128,6 +131,13 @@ else
fi
# We require $(...) support unconditionally.
+# We require non-surprising "local" semantics (this eliminates dash).
+# This takes the admittedly draconian step of eliminating dash, because the
+# assignment tab=$(printf '\t') works fine, yet preceding it with "local "
+# transforms it into an assignment that sets the variable to the empty string.
+# That is too counter-intuitive, and can lead to subtle run-time malfunction.
+# The example below is less subtle in that with dash, it evokes the run-time
+# exception "dash: 1: local: 1: bad variable name".
# We require a few additional shell features only when $EXEEXT is nonempty,
# in order to support automatic $EXEEXT emulation:
# - hyphen-containing alias names
@@ -151,6 +161,7 @@ fi
gl_shell_test_script_='
test $(echo y) = y || exit 1
f_local_() { local v=1; }; f_local_ || exit 1
+f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_
score_=10
if test "$VERBOSE" = yes; then
test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
@@ -287,44 +298,24 @@ compare_dev_null_ ()
return 2
}
-if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \
- && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then
- # diff accepts the -u option and does not (like AIX 7 'diff') produce an
- # extra space on column 1 of every content line.
- if test -z "$diff_out_"; then
- compare_ () { diff -u "$@"; }
- else
- compare_ ()
- {
- if diff -u "$@" > diff.out; then
- # No differences were found, but Solaris 'diff' produces output
- # "No differences encountered". Hide this output.
- rm -f diff.out
- true
- else
- cat diff.out
- rm -f diff.out
- false
- fi
- }
- fi
-elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
+for diff_opt_ in -u -U3 -c '' no; do
+ test "$diff_opt_" != no &&
+ diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+ break
+done
+if test "$diff_opt_" != no; then
if test -z "$diff_out_"; then
- compare_ () { diff -c "$@"; }
+ compare_ () { diff $diff_opt_ "$@"; }
else
compare_ ()
{
- if diff -c "$@" > diff.out; then
- # No differences were found, but AIX and HP-UX 'diff' produce output
- # "No differences encountered" or "There are no differences between the
- # files.". Hide this output.
- rm -f diff.out
- true
- else
- cat diff.out
- rm -f diff.out
- false
- fi
+ # If no differences were found, AIX and HP-UX 'diff' produce output
+ # like "No differences encountered". Hide this output.
+ diff $diff_opt_ "$@" > diff.out
+ diff_status_=$?
+ test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
+ rm -f diff.out || diff_status_=2
+ return $diff_status_
}
fi
elif cmp -s /dev/null /dev/null 2>/dev/null; then
@@ -361,11 +352,15 @@ remove_tmp_ ()
{
__st=$?
cleanup_
- # cd out of the directory we're about to remove
- cd "$initial_cwd_" || cd / || cd /tmp
- chmod -R u+rwx "$test_dir_"
- # If removal fails and exit status was to be 0, then change it to 1.
- rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ if test "$KEEP" = yes; then
+ echo "Not removing temporary directory $test_dir_"
+ else
+ # cd out of the directory we're about to remove
+ cd "$initial_cwd_" || cd / || cd /tmp
+ chmod -R u+rwx "$test_dir_"
+ # If removal fails and exit status was to be 0, then change it to 1.
+ rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ fi
exit $__st
}
@@ -466,7 +461,6 @@ setup_ ()
fi
initial_cwd_=$PWD
- fail=0
pfx_=`testdir_prefix_`
test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
@@ -550,8 +544,9 @@ mktempd_ ()
# Disallow any trailing slash on specified destdir:
# it would subvert the post-mktemp "case"-based destdir test.
case $destdir_ in
- /) ;;
+ / | //) destdir_slash_=$destdir;;
*/) fail_ "invalid destination dir: remove trailing slash(es)";;
+ *) destdir_slash_=$destdir_/;;
esac
case $template_ in
@@ -561,20 +556,17 @@ mktempd_ ()
esac
# First, try to use mktemp.
- d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
- || fail=1
+ d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
# The resulting name must be in the specified directory.
- case $d in "$destdir_"*);; *) fail=1;; esac
+ case $d in "$destdir_slash_"*) :;; *) false;; esac &&
# It must have created the directory.
- test -d "$d" || fail=1
+ test -d "$d" &&
# It must have 0700 permissions. Handle sticky "S" bits.
- perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1
- case $perms in drwx------*) ;; *) fail=1;; esac
-
- test $fail = 0 && {
+ perms=`ls -dgo "$d" 2>/dev/null` &&
+ case $perms in drwx--[-S]---*) :;; *) false;; esac && {
echo "$d"
return
}
@@ -593,7 +585,7 @@ mktempd_ ()
i_=1
while :; do
X_=`rand_bytes_ $nx_`
- candidate_dir_="$destdir_/$base_template_$X_"
+ candidate_dir_="$destdir_slash_$base_template_$X_"
err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
&& { echo "$candidate_dir_"; return; }
test $MAX_TRIES_ -le $i_ && break;
diff --git a/testsuite/invalid-mb-seq-UMR.sh b/testsuite/invalid-mb-seq-UMR.sh
index d87bd4c..1602023 100755
--- a/testsuite/invalid-mb-seq-UMR.sh
+++ b/testsuite/invalid-mb-seq-UMR.sh
@@ -2,7 +2,7 @@
# Inserting an invalid multibyte sequence could lead to
# reading uninitialized memory.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/local.mk b/testsuite/local.mk
index ae1f06c..2c8c718 100644
--- a/testsuite/local.mk
+++ b/testsuite/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,6 +38,7 @@ T = \
testsuite/mb-charclass-non-utf8.sh \
testsuite/mb-match-slash.sh \
testsuite/mb-y-translate.sh \
+ testsuite/newline-dfa-bug.sh \
testsuite/normalize-text.sh \
testsuite/nulldata.sh \
testsuite/panic-tests.sh \
diff --git a/testsuite/mb-bad-delim.sh b/testsuite/mb-bad-delim.sh
index ac43a49..a577c24 100755
--- a/testsuite/mb-bad-delim.sh
+++ b/testsuite/mb-bad-delim.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 's' and 'y' non-slash delimiters in multibyte locales
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/mb-charclass-non-utf8.sh b/testsuite/mb-charclass-non-utf8.sh
index ab3d2fd..6ef2740 100755
--- a/testsuite/mb-charclass-non-utf8.sh
+++ b/testsuite/mb-charclass-non-utf8.sh
@@ -4,7 +4,7 @@
# a single-byte character, or the second byte of a multibyte
# character.
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/mb-match-slash.sh b/testsuite/mb-match-slash.sh
index 787b5d6..bfa9998 100755
--- a/testsuite/mb-match-slash.sh
+++ b/testsuite/mb-match-slash.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test slash following an incomplete multibyte character
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/mb-y-translate.sh b/testsuite/mb-y-translate.sh
index a1f59c4..a5188a1 100755
--- a/testsuite/mb-y-translate.sh
+++ b/testsuite/mb-y-translate.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test multibyte y/// translations
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/newline-dfa-bug.sh b/testsuite/newline-dfa-bug.sh
new file mode 100755
index 0000000..91f1ed1
--- /dev/null
+++ b/testsuite/newline-dfa-bug.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+# sed may access to uninitialized memory if transit to 15th dfa state
+# with newline. This bug affected sed version 4.3.
+
+# Copyright (C) 2017 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+require_valgrind_
+
+printf 'abcdefg abcdefg\nB\n' > in || framework_failure_
+printf 'B\n' > exp || framework_failure_
+
+valgrind --quiet --error-exitcode=1 \
+ sed 'N;s/abcdefg.*\n//' in > out 2> err || fail=1
+
+# Work around a bug in CentOS 5.10's valgrind
+# FIXME: remove in 2018 or when CentOS 5 is no longer officially supported
+grep 'valgrind: .*Assertion.*failed' err > /dev/null \
+ && skip_ 'you seem to have a buggy version of valgrind'
+
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/normalize-text.sh b/testsuite/normalize-text.sh
index 9a34a03..e3c0610 100644
--- a/testsuite/normalize-text.sh
+++ b/testsuite/normalize-text.sh
@@ -4,7 +4,7 @@
# \dNNN \xNN \oNNN - tested in 'convert-number.sh'
# character-classes in POSIX mode - tested in 'posix-char-class.sh'
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/nulldata.sh b/testsuite/nulldata.sh
index 91befc6..e2be647 100755
--- a/testsuite/nulldata.sh
+++ b/testsuite/nulldata.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test -z/--null-data option
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/panic-tests.sh b/testsuite/panic-tests.sh
index a2dba00..0cacd17 100644
--- a/testsuite/panic-tests.sh
+++ b/testsuite/panic-tests.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise some panic stops
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/posix-char-class.sh b/testsuite/posix-char-class.sh
index db7a97f..d0a41f1 100644
--- a/testsuite/posix-char-class.sh
+++ b/testsuite/posix-char-class.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test character-class definitions in POSIX mode.
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/posix-mode-N.sh b/testsuite/posix-mode-N.sh
index 2c7c128..36306bf 100755
--- a/testsuite/posix-mode-N.sh
+++ b/testsuite/posix-mode-N.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test 'N' command with/without posix conformity
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/posix-mode-addr.sh b/testsuite/posix-mode-addr.sh
index 6f3c112..dd79a3a 100644
--- a/testsuite/posix-mode-addr.sh
+++ b/testsuite/posix-mode-addr.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure GNU address extensions are rejected in posix mode
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/posix-mode-bad-ref.sh b/testsuite/posix-mode-bad-ref.sh
index f578917..f225cd2 100755
--- a/testsuite/posix-mode-bad-ref.sh
+++ b/testsuite/posix-mode-bad-ref.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test non-posix-conforming gnu extensions when using --posix.
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/posix-mode-s.sh b/testsuite/posix-mode-s.sh
index d284a4d..d76636a 100644
--- a/testsuite/posix-mode-s.sh
+++ b/testsuite/posix-mode-s.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure GNU extensions are rejected in posix mode
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/range-overlap.sh b/testsuite/range-overlap.sh
index 267eb03..9d80bf8 100755
--- a/testsuite/range-overlap.sh
+++ b/testsuite/range-overlap.sh
@@ -2,7 +2,7 @@
# Verify that even with overlapping ranges of line numbers,
# only the selected lines are affected.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/recursive-escape-c.sh b/testsuite/recursive-escape-c.sh
index 88c9399..3d26532 100644
--- a/testsuite/recursive-escape-c.sh
+++ b/testsuite/recursive-escape-c.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# test \c escaping
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/regex-errors.sh b/testsuite/regex-errors.sh
index 292b2b3..6c41206 100644
--- a/testsuite/regex-errors.sh
+++ b/testsuite/regex-errors.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Exercise regex_compile errors
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/runptests.c b/testsuite/runptests.c
index fb787e7..0510b31 100644
--- a/testsuite/runptests.c
+++ b/testsuite/runptests.c
@@ -1,5 +1,5 @@
/* POSIX regex testsuite from IEEE 2003.2.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
diff --git a/testsuite/sandbox.sh b/testsuite/sandbox.sh
index 3e529fe..3a2f551 100755
--- a/testsuite/sandbox.sh
+++ b/testsuite/sandbox.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test --sandbox mode
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/stdin-prog.sh b/testsuite/stdin-prog.sh
index a8f992c..9597503 100644
--- a/testsuite/stdin-prog.sh
+++ b/testsuite/stdin-prog.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test program file from STDIN
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/subst-mb-incomplete.sh b/testsuite/subst-mb-incomplete.sh
index 90d73cf..849061c 100755
--- a/testsuite/subst-mb-incomplete.sh
+++ b/testsuite/subst-mb-incomplete.sh
@@ -3,7 +3,7 @@
# performing a substitution with a replacement string containing an
# incomplete multi-byte character.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/subst-options.sh b/testsuite/subst-options.sh
index b05eb1b..5a9e211 100644
--- a/testsuite/subst-options.sh
+++ b/testsuite/subst-options.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test Substitute options (for code-coverage purposes as well)
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/subst-replacement.sh b/testsuite/subst-replacement.sh
index c385be3..cd41388 100644
--- a/testsuite/subst-replacement.sh
+++ b/testsuite/subst-replacement.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test Substitute replacements, e.g. 's/(.)/\U\1/'
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/temp-file-cleanup.sh b/testsuite/temp-file-cleanup.sh
index aadb9ce..953506a 100755
--- a/testsuite/temp-file-cleanup.sh
+++ b/testsuite/temp-file-cleanup.sh
@@ -2,7 +2,7 @@
# Verify that an erroneous use of sed -i no longer leaves behind
# a temporary file.
-# Copyright (C) 2015-2016 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/test-mbrtowc.c b/testsuite/test-mbrtowc.c
index 04c20fc..b76d3fd 100644
--- a/testsuite/test-mbrtowc.c
+++ b/testsuite/test-mbrtowc.c
@@ -1,5 +1,5 @@
/* Auxiliary program to test mbrtowc(3) behaviour.
- Copyright 2016 Free Software Foundation, Inc.
+ Copyright 2016-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/testsuite/title-case.sh b/testsuite/title-case.sh
index 962929b..60c8341 100755
--- a/testsuite/title-case.sh
+++ b/testsuite/title-case.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test case insensitive matching for titlecase and similarly odd chars.
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/tst-boost.c b/testsuite/tst-boost.c
index 6265123..8227deb 100644
--- a/testsuite/tst-boost.c
+++ b/testsuite/tst-boost.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/testsuite/tst-pcre.c b/testsuite/tst-pcre.c
index eb16424..c6c41fc 100644
--- a/testsuite/tst-pcre.c
+++ b/testsuite/tst-pcre.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/testsuite/tst-rxspencer.c b/testsuite/tst-rxspencer.c
index 0c060a4..a8785bd 100644
--- a/testsuite/tst-rxspencer.c
+++ b/testsuite/tst-rxspencer.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/testsuite/unbuffered.sh b/testsuite/unbuffered.sh
index b1a4c1b..a0996e7 100644
--- a/testsuite/unbuffered.sh
+++ b/testsuite/unbuffered.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Test -u/--unbuffered option
-# Copyright (C) 2016 Free Software Foundation, Inc.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/testsuite/xemacs.good b/testsuite/xemacs.good
index 4480027..3d97caf 100644
--- a/testsuite/xemacs.good
+++ b/testsuite/xemacs.good
@@ -1,6 +1,6 @@
#Makefile.in generated automatically by automake 1.5 from Makefile.am.
-#Copyright 1994-2016 Free Software Foundation, Inc.
+#Copyright 1994-2017 Free Software Foundation, Inc.
#This Makefile.in is free software; the Free Software Foundation
#gives unlimited permission to copy and/or distribute it,
#with or without modifications, as long as this notice is preserved.
diff --git a/testsuite/xemacs.inp b/testsuite/xemacs.inp
index 6beacff..3b8b255 100644
--- a/testsuite/xemacs.inp
+++ b/testsuite/xemacs.inp
@@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-# Copyright 1994-2016 Free Software Foundation, Inc.
+# Copyright 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.