summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/8bit.sed2
-rw-r--r--testsuite/BOOST.tests29
-rw-r--r--testsuite/Makefile.am103
-rw-r--r--testsuite/Makefile.in1553
-rw-r--r--testsuite/Makefile.tests127
-rw-r--r--testsuite/PCRE.tests178
-rw-r--r--testsuite/badenc.sed2
-rw-r--r--testsuite/binary.sed8
-rw-r--r--testsuite/binary2.sed8
-rw-r--r--testsuite/binary3.sed8
-rw-r--r--testsuite/bug-regex10.c6
-rw-r--r--testsuite/bug-regex11.c6
-rw-r--r--testsuite/bug-regex12.c6
-rw-r--r--testsuite/bug-regex13.c6
-rw-r--r--testsuite/bug-regex14.c6
-rw-r--r--testsuite/bug-regex15.c4
-rw-r--r--testsuite/bug-regex16.c4
-rw-r--r--testsuite/bug-regex21.c6
-rw-r--r--testsuite/bug-regex27.c2
-rw-r--r--testsuite/bug-regex28.c2
-rw-r--r--testsuite/bug-regex7.c6
-rw-r--r--testsuite/bug-regex8.c6
-rw-r--r--testsuite/bug-regex9.c6
-rw-r--r--testsuite/cmd-R.sh49
-rwxr-xr-xtestsuite/cmd-l.sh77
-rwxr-xr-xtestsuite/colon-with-no-label.sh33
-rw-r--r--testsuite/comment-n.sh97
-rw-r--r--testsuite/compile-errors.sh292
-rw-r--r--testsuite/compile-tests.sh138
-rwxr-xr-xtestsuite/convert-number.sh181
-rw-r--r--testsuite/dc.inp2
-rw-r--r--testsuite/distrib.sh2
-rw-r--r--testsuite/envvar-check64
-rw-r--r--testsuite/eval.good18
-rw-r--r--testsuite/eval.inp4
-rw-r--r--testsuite/eval.sed12
-rw-r--r--testsuite/execute-tests.sh145
-rw-r--r--testsuite/fasts.sed3
-rw-r--r--testsuite/flipcase.sed2
-rwxr-xr-xtestsuite/follow-symlinks-stdin.sh29
-rw-r--r--testsuite/follow-symlinks.sh74
-rw-r--r--testsuite/get-mb-cur-max.c37
-rwxr-xr-xtestsuite/help-version.sh276
-rwxr-xr-xtestsuite/in-place-hyphen.sh30
-rw-r--r--testsuite/in-place-suffix-backup.sh64
-rw-r--r--testsuite/inclib.good68
-rw-r--r--testsuite/inclib.inp68
-rw-r--r--testsuite/init.sh613
-rwxr-xr-xtestsuite/invalid-mb-seq-UMR.sh42
-rw-r--r--testsuite/khadafy.good2
-rw-r--r--testsuite/khadafy.inp2
-rw-r--r--testsuite/linecnt.good4
-rw-r--r--testsuite/linecnt.inp4
-rw-r--r--testsuite/local.mk370
-rw-r--r--testsuite/mac-mf.good54
-rw-r--r--testsuite/mac-mf.inp36
-rw-r--r--testsuite/mac-mf.sed3
-rw-r--r--testsuite/manis.sed4
-rwxr-xr-xtestsuite/mb-bad-delim.sh84
-rwxr-xr-xtestsuite/mb-charclass-non-utf8.sh132
-rwxr-xr-xtestsuite/mb-match-slash.sh48
-rwxr-xr-xtestsuite/mb-y-translate.sh135
-rw-r--r--testsuite/newline-anchor.good3
-rw-r--r--testsuite/newline-anchor.inp3
-rw-r--r--testsuite/newline-anchor.sed6
-rw-r--r--testsuite/normalize-text.sh83
-rwxr-xr-xtestsuite/nulldata.sh87
-rw-r--r--testsuite/panic-tests.sh101
-rw-r--r--testsuite/posix-char-class.sh67
-rwxr-xr-xtestsuite/posix-mode-N.sh58
-rw-r--r--testsuite/posix-mode-addr.sh91
-rwxr-xr-xtestsuite/posix-mode-bad-ref.sh34
-rw-r--r--testsuite/posix-mode-s.sh73
-rwxr-xr-xtestsuite/range-overlap.sh35
-rw-r--r--testsuite/recursive-escape-c.sh72
-rw-r--r--testsuite/regex-errors.sh43
-rw-r--r--testsuite/runptests.c6
-rwxr-xr-xtestsuite/runtest32
-rw-r--r--testsuite/runtests.c8
-rwxr-xr-xtestsuite/sandbox.sh92
-rw-r--r--testsuite/stdin-prog.sh39
-rwxr-xr-xtestsuite/subst-mb-incomplete.sh34
-rw-r--r--testsuite/subst-options.sh125
-rw-r--r--testsuite/subst-replacement.sh88
-rwxr-xr-xtestsuite/temp-file-cleanup.sh37
-rw-r--r--testsuite/test-mbrtowc.c172
-rwxr-xr-xtestsuite/title-case.sh36
-rw-r--r--testsuite/tst-boost.c6
-rw-r--r--testsuite/tst-pcre.c8
-rw-r--r--testsuite/tst-regex2.c4
-rw-r--r--testsuite/tst-rxspencer.c8
-rw-r--r--testsuite/unbuffered.sh37
-rw-r--r--testsuite/uniq.good2
-rw-r--r--testsuite/uniq.inp4
-rw-r--r--testsuite/utf8-1.good2
-rw-r--r--testsuite/utf8-1.inp2
-rw-r--r--testsuite/utf8-2.good2
-rw-r--r--testsuite/utf8-2.inp2
-rw-r--r--testsuite/utf8-3.good2
-rw-r--r--testsuite/utf8-3.inp2
-rw-r--r--testsuite/utf8-4.good2
-rw-r--r--testsuite/utf8-4.inp2
-rw-r--r--testsuite/version.gin12
-rw-r--r--testsuite/xbxcx.good2
-rw-r--r--testsuite/xbxcx.inp2
-rw-r--r--testsuite/xemacs.good5
-rw-r--r--testsuite/xemacs.inp5
-rw-r--r--testsuite/y-bracket.good2
-rw-r--r--testsuite/y-bracket.inp2
-rw-r--r--testsuite/y-newline.good2
-rw-r--r--testsuite/y-newline.inp2
-rw-r--r--testsuite/y-zero.goodbin0 -> 4 bytes
-rw-r--r--testsuite/y-zero.inp1
-rw-r--r--testsuite/y-zero.sed1
-rw-r--r--testsuite/zero-anchor.goodbin0 -> 14 bytes
-rw-r--r--testsuite/zero-anchor.inpbin0 -> 6 bytes
-rw-r--r--testsuite/zero-anchor.sed6
117 files changed, 4833 insertions, 2101 deletions
diff --git a/testsuite/8bit.sed b/testsuite/8bit.sed
index 7b3ed8d..37c0624 100644
--- a/testsuite/8bit.sed
+++ b/testsuite/8bit.sed
@@ -16,6 +16,6 @@
# Oh, well I remember
# How on such a day we used to meet--
# My lover and I!
-# -- Kakinomoto Hitomaro
+# -- Kakinomoto Hitomaro
#
s///
diff --git a/testsuite/BOOST.tests b/testsuite/BOOST.tests
index 98fd3b6..3ec355c 100644
--- a/testsuite/BOOST.tests
+++ b/testsuite/BOOST.tests
@@ -1,5 +1,5 @@
-;
-;
+;
+;
; this file contains a script of tests to run through regress.exe
;
; comments start with a semicolon and proceed to the end of the line
@@ -289,7 +289,7 @@ a((b)*\2)*d abbbd 0 5 1 4 2 3
(a)\1bc*[ce]d aabcccd 0 7 0 1
^(a)\1b(c)*cd$ aabcccd 0 7 0 1 4 5
-; posix only:
+; posix only:
- match_default extended REG_EXTENDED
(ab*)[ab]*\1 ababaaa 0 7 0 1
@@ -391,11 +391,11 @@ a(b*|c|e)d ad 0 2 1 1
a(b?)c abc 0 3 1 2
a(b?)c ac 0 2 1 1
a(b+)c abc 0 3 1 2
-a(b+)c abbbc 0 5 1 4
-a(b*)c ac 0 2 1 1
+a(b+)c abbbc 0 5 1 4
+a(b*)c ac 0 2 1 1
(a|ab)(bc([de]+)f|cde) abcdef 0 6 0 1 1 6 3 5
a([bc]?)c abc 0 3 1 2
-a([bc]?)c ac 0 2 1 1
+a([bc]?)c ac 0 2 1 1
a([bc]+)c abc 0 3 1 2
a([bc]+)c abcc 0 4 1 3
a([bc]+)bc abcbc 0 5 1 3
@@ -774,13 +774,13 @@ a()b\1 ab 0 2 1 1
; subtleties of matching with no sub-expressions marked
- normal match_nosubs REG_NO_POSIX_TEST
-a(b?c)+d accd 0 4
-(wee|week)(knights|night) weeknights 0 10
+a(b?c)+d accd 0 4
+(wee|week)(knights|night) weeknights 0 10
.* abc 0 3
-a(b|(c))d abd 0 3
+a(b|(c))d abd 0 3
a(b|(c))d acd 0 3
a(b*|c|e)d abbd 0 4
-a(b*|c|e)d acd 0 3
+a(b*|c|e)d acd 0 3
a(b*|c|e)d ad 0 2
a(b?)c abc 0 3
a(b?)c ac 0 2
@@ -801,13 +801,13 @@ a(bbb+|bb+|b)bb abbb 0 4
(a*)* bc 0 0
- normal nosubs REG_NO_POSIX_TEST
-a(b?c)+d accd 0 4
-(wee|week)(knights|night) weeknights 0 10
+a(b?c)+d accd 0 4
+(wee|week)(knights|night) weeknights 0 10
.* abc 0 3
-a(b|(c))d abd 0 3
+a(b|(c))d abd 0 3
a(b|(c))d acd 0 3
a(b*|c|e)d abbd 0 4
-a(b*|c|e)d acd 0 3
+a(b*|c|e)d acd 0 3
a(b*|c|e)d ad 0 2
a(b?)c abc 0 3
a(b?)c ac 0 2
@@ -826,4 +826,3 @@ a(bbb+|bb+|b)b abbb 0 4
a(bbb+|bb+|b)bb abbb 0 4
(.*).* abcdef 0 6
(a*)* bc 0 0
-
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
deleted file mode 100644
index d80e72c..0000000
--- a/testsuite/Makefile.am
+++ /dev/null
@@ -1,103 +0,0 @@
-CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
-
-TESTS = $(check_PROGRAMS) $(SEDTESTS)
-SEDTESTS =
-
-LDADD = ../lib/libsed.a @INTLLIBS@
-noinst_HEADERS = testcases.h ptestcases.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
-
-if TEST_REGEX
-check_PROGRAMS = bug-regex7 \
- bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
- bug-regex13 bug-regex14 bug-regex15 bug-regex16 bug-regex21 \
- bug-regex27 bug-regex28 \
- tst-pcre tst-boost runtests runptests tst-rxspencer tst-regex2
-
-SEDTESTS += space
-endif
-
-SEDTESTS += \
- appquit enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
- modulo numsub numsub2 numsub3 numsub4 numsub5 0range bkslashes \
- head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
- fasts uniq manis khadafy linecnt eval distrib 8to7 y-bracket \
- y-newline allsub cv-vars classes middle bsd stdin flipcase \
- insens subwrite writeout readin insert utf8-1 utf8-2 utf8-3 utf8-4 \
- badenc inplace-hold brackets amp-escape \
- help version file quiet \
- factor binary3 binary2 binary dc
-
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" \
- @LOCALCHARSET_TESTS_ENVIRONMENT@ $(srcdir)/runtest
-
-
-EXTRA_DIST = \
- PCRE.tests BOOST.tests SPENCER.tests \
- runtest Makefile.tests \
- 0range.good 0range.inp 0range.sed \
- 8bit.good 8bit.inp 8bit.sed \
- 8to7.good 8to7.inp 8to7.sed \
- allsub.good allsub.inp allsub.sed \
- amp-escape.good amp-escape.inp amp-escape.sed \
- appquit.good appquit.inp appquit.sed \
- binary.good binary.inp binary.sed binary2.sed binary3.sed \
- bkslashes.good bkslashes.inp bkslashes.sed \
- brackets.good brackets.inp brackets.sed \
- bsd.good bsd.sh \
- cv-vars.good cv-vars.inp cv-vars.sed \
- classes.good classes.inp classes.sed \
- dc.good dc.inp dc.sed \
- distrib.good distrib.inp distrib.sed distrib.sh \
- dollar.good dollar.inp dollar.sed \
- empty.good empty.inp empty.sed \
- enable.good enable.inp enable.sed \
- eval.good eval.inp eval.sed \
- factor.good factor.inp factor.sed \
- fasts.good fasts.inp fasts.sed \
- flipcase.good flipcase.inp flipcase.sed \
- head.good head.inp head.sed \
- inclib.good inclib.inp inclib.sed \
- insens.good insens.inp insens.sed \
- insert.good insert.inp insert.sed \
- khadafy.good khadafy.inp khadafy.sed \
- linecnt.good linecnt.inp linecnt.sed \
- space.good space.inp space.sed \
- mac-mf.good mac-mf.inp mac-mf.sed \
- madding.good madding.inp madding.sed \
- manis.good manis.inp manis.sed \
- middle.good middle.sed middle.inp \
- modulo.good modulo.sed modulo.inp \
- newjis.good newjis.inp newjis.sed \
- noeol.good noeol.inp noeol.sed \
- noeolw.good noeolw.1good noeolw.2good noeolw.sed \
- numsub.good numsub.inp numsub.sed \
- numsub2.good numsub2.inp numsub2.sed \
- numsub3.good numsub3.inp numsub3.sed \
- numsub4.good numsub4.inp numsub4.sed \
- numsub5.good numsub5.inp numsub5.sed \
- readin.good readin.inp readin.sed \
- recall.good recall.inp recall.sed \
- recall2.good recall2.inp recall2.sed \
- sep.good sep.inp sep.sed \
- subwrite.inp subwrite.sed subwrt1.good subwrt2.good \
- uniq.good uniq.inp uniq.sed \
- utf8-1.good utf8-1.inp utf8-1.sed \
- utf8-2.good utf8-2.inp utf8-2.sed \
- utf8-3.good utf8-3.inp utf8-3.sed \
- utf8-4.good utf8-4.inp utf8-4.sed \
- badenc.good badenc.inp badenc.sed \
- version.gin \
- writeout.inp writeout.sed wrtout1.good wrtout2.good \
- xabcx.good xabcx.inp xabcx.sed \
- xbxcx.good xbxcx.inp xbxcx.sed \
- xbxcx3.good xbxcx3.inp xbxcx3.sed \
- xemacs.good xemacs.inp xemacs.sed \
- y-bracket.good y-bracket.sed y-bracket.inp \
- y-newline.good y-newline.sed y-newline.inp
-
-# automake makes `check' depend on $(TESTS). Declare
-# dummy targets for $(TESTS) so that make does not complain.
-
-.PHONY: $(SEDTESTS)
-$(SEDTESTS):
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
deleted file mode 100644
index 66e72ce..0000000
--- a/testsuite/Makefile.in
+++ /dev/null
@@ -1,1553 +0,0 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-@TEST_REGEX_TRUE@check_PROGRAMS = bug-regex7$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex12$(EXEEXT) bug-regex13$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex16$(EXEEXT) bug-regex21$(EXEEXT) \
-@TEST_REGEX_TRUE@ bug-regex27$(EXEEXT) bug-regex28$(EXEEXT) \
-@TEST_REGEX_TRUE@ tst-pcre$(EXEEXT) tst-boost$(EXEEXT) \
-@TEST_REGEX_TRUE@ runtests$(EXEEXT) runptests$(EXEEXT) \
-@TEST_REGEX_TRUE@ tst-rxspencer$(EXEEXT) tst-regex2$(EXEEXT)
-@TEST_REGEX_TRUE@am__append_1 = space
-subdir = testsuite
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/version.gin \
- $(top_srcdir)/build-aux/depcomp
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
- $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/canonicalize.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/configmake.m4 \
- $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/errno_h.m4 \
- $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/extensions.m4 \
- $(top_srcdir)/m4/extern-inline.m4 $(top_srcdir)/m4/fcntl-o.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fstat.m4 \
- $(top_srcdir)/m4/fwriting.m4 $(top_srcdir)/m4/getdelim.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
- $(top_srcdir)/m4/include_next.m4 \
- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/langinfo_h.m4 \
- $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
- $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
- $(top_srcdir)/m4/mbrlen.m4 $(top_srcdir)/m4/mbrtowc.m4 \
- $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbstate_t.m4 \
- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
- $(top_srcdir)/m4/mkostemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/msvc-inval.m4 \
- $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
- $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \
- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
- $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
- $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/regex.m4 \
- $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/rmdir.m4 \
- $(top_srcdir)/m4/selinux-context-h.m4 \
- $(top_srcdir)/m4/selinux-selinux-h.m4 \
- $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
- $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
- $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
- $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
- $(top_srcdir)/m4/strverscmp.m4 \
- $(top_srcdir)/m4/sys_socket_h.m4 \
- $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/version-etc.m4 \
- $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \
- $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
- $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
- $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = version.good
-CONFIG_CLEAN_VPATH_FILES =
-bug_regex10_SOURCES = bug-regex10.c
-bug_regex10_OBJECTS = bug-regex10.$(OBJEXT)
-bug_regex10_LDADD = $(LDADD)
-bug_regex10_DEPENDENCIES = ../lib/libsed.a
-bug_regex11_SOURCES = bug-regex11.c
-bug_regex11_OBJECTS = bug-regex11.$(OBJEXT)
-bug_regex11_LDADD = $(LDADD)
-bug_regex11_DEPENDENCIES = ../lib/libsed.a
-bug_regex12_SOURCES = bug-regex12.c
-bug_regex12_OBJECTS = bug-regex12.$(OBJEXT)
-bug_regex12_LDADD = $(LDADD)
-bug_regex12_DEPENDENCIES = ../lib/libsed.a
-bug_regex13_SOURCES = bug-regex13.c
-bug_regex13_OBJECTS = bug-regex13.$(OBJEXT)
-bug_regex13_LDADD = $(LDADD)
-bug_regex13_DEPENDENCIES = ../lib/libsed.a
-bug_regex14_SOURCES = bug-regex14.c
-bug_regex14_OBJECTS = bug-regex14.$(OBJEXT)
-bug_regex14_LDADD = $(LDADD)
-bug_regex14_DEPENDENCIES = ../lib/libsed.a
-bug_regex15_SOURCES = bug-regex15.c
-bug_regex15_OBJECTS = bug-regex15.$(OBJEXT)
-bug_regex15_LDADD = $(LDADD)
-bug_regex15_DEPENDENCIES = ../lib/libsed.a
-bug_regex16_SOURCES = bug-regex16.c
-bug_regex16_OBJECTS = bug-regex16.$(OBJEXT)
-bug_regex16_LDADD = $(LDADD)
-bug_regex16_DEPENDENCIES = ../lib/libsed.a
-bug_regex21_SOURCES = bug-regex21.c
-bug_regex21_OBJECTS = bug-regex21.$(OBJEXT)
-bug_regex21_LDADD = $(LDADD)
-bug_regex21_DEPENDENCIES = ../lib/libsed.a
-bug_regex27_SOURCES = bug-regex27.c
-bug_regex27_OBJECTS = bug-regex27.$(OBJEXT)
-bug_regex27_LDADD = $(LDADD)
-bug_regex27_DEPENDENCIES = ../lib/libsed.a
-bug_regex28_SOURCES = bug-regex28.c
-bug_regex28_OBJECTS = bug-regex28.$(OBJEXT)
-bug_regex28_LDADD = $(LDADD)
-bug_regex28_DEPENDENCIES = ../lib/libsed.a
-bug_regex7_SOURCES = bug-regex7.c
-bug_regex7_OBJECTS = bug-regex7.$(OBJEXT)
-bug_regex7_LDADD = $(LDADD)
-bug_regex7_DEPENDENCIES = ../lib/libsed.a
-bug_regex8_SOURCES = bug-regex8.c
-bug_regex8_OBJECTS = bug-regex8.$(OBJEXT)
-bug_regex8_LDADD = $(LDADD)
-bug_regex8_DEPENDENCIES = ../lib/libsed.a
-bug_regex9_SOURCES = bug-regex9.c
-bug_regex9_OBJECTS = bug-regex9.$(OBJEXT)
-bug_regex9_LDADD = $(LDADD)
-bug_regex9_DEPENDENCIES = ../lib/libsed.a
-runptests_SOURCES = runptests.c
-runptests_OBJECTS = runptests.$(OBJEXT)
-runptests_LDADD = $(LDADD)
-runptests_DEPENDENCIES = ../lib/libsed.a
-runtests_SOURCES = runtests.c
-runtests_OBJECTS = runtests.$(OBJEXT)
-runtests_LDADD = $(LDADD)
-runtests_DEPENDENCIES = ../lib/libsed.a
-tst_boost_SOURCES = tst-boost.c
-tst_boost_OBJECTS = tst-boost.$(OBJEXT)
-tst_boost_LDADD = $(LDADD)
-tst_boost_DEPENDENCIES = ../lib/libsed.a
-tst_pcre_SOURCES = tst-pcre.c
-tst_pcre_OBJECTS = tst-pcre.$(OBJEXT)
-tst_pcre_LDADD = $(LDADD)
-tst_pcre_DEPENDENCIES = ../lib/libsed.a
-tst_regex2_SOURCES = tst-regex2.c
-tst_regex2_OBJECTS = tst-regex2.$(OBJEXT)
-tst_regex2_LDADD = $(LDADD)
-tst_regex2_DEPENDENCIES = ../lib/libsed.a
-tst_rxspencer_SOURCES = tst-rxspencer.c
-tst_rxspencer_OBJECTS = tst-rxspencer.$(OBJEXT)
-tst_rxspencer_LDADD = $(LDADD)
-tst_rxspencer_DEPENDENCIES = ../lib/libsed.a
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = bug-regex10.c bug-regex11.c bug-regex12.c bug-regex13.c \
- bug-regex14.c bug-regex15.c bug-regex16.c bug-regex21.c \
- bug-regex27.c bug-regex28.c bug-regex7.c bug-regex8.c \
- bug-regex9.c runptests.c runtests.c tst-boost.c tst-pcre.c \
- tst-regex2.c tst-rxspencer.c
-DIST_SOURCES = bug-regex10.c bug-regex11.c bug-regex12.c bug-regex13.c \
- bug-regex14.c bug-regex15.c bug-regex16.c bug-regex21.c \
- bug-regex27.c bug-regex28.c bug-regex7.c bug-regex8.c \
- bug-regex9.c runptests.c runtests.c tst-boost.c tst-pcre.c \
- tst-regex2.c tst-rxspencer.c
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors_dummy = \
- mgn= red= grn= lgn= blu= brg= std=; \
- am__color_tests=no
-am__tty_colors = $(am__tty_colors_dummy)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-pkglibexecdir = @pkglibexecdir@
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-ALLOCA_H = @ALLOCA_H@
-AMTAR = @AMTAR@
-APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
-BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
-BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
-BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
-BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-COPYRIGHT_YEAR = @COPYRIGHT_YEAR@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
-EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
-ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
-ENOLINK_VALUE = @ENOLINK_VALUE@
-EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
-EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
-ERRNO_H = @ERRNO_H@
-EXEEXT = @EXEEXT@
-GETOPT_H = @GETOPT_H@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
-GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
-GREP = @GREP@
-HAVE_ATOLL = @HAVE_ATOLL@
-HAVE_BTOWC = @HAVE_BTOWC@
-HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
-HAVE_CHOWN = @HAVE_CHOWN@
-HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
-HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
-HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
-HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
-HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
-HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
-HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
-HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
-HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
-HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
-HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
-HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
-HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
-HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
-HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
-HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
-HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
-HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
-HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
-HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
-HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
-HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
-HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
-HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
-HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
-HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
-HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
-HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
-HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
-HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
-HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
-HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
-HAVE_DUP3 = @HAVE_DUP3@
-HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
-HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
-HAVE_FACCESSAT = @HAVE_FACCESSAT@
-HAVE_FCHDIR = @HAVE_FCHDIR@
-HAVE_FCHMODAT = @HAVE_FCHMODAT@
-HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
-HAVE_FCNTL = @HAVE_FCNTL@
-HAVE_FDATASYNC = @HAVE_FDATASYNC@
-HAVE_FEATURES_H = @HAVE_FEATURES_H@
-HAVE_FFSL = @HAVE_FFSL@
-HAVE_FFSLL = @HAVE_FFSLL@
-HAVE_FSEEKO = @HAVE_FSEEKO@
-HAVE_FSTATAT = @HAVE_FSTATAT@
-HAVE_FSYNC = @HAVE_FSYNC@
-HAVE_FTELLO = @HAVE_FTELLO@
-HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
-HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
-HAVE_GETGROUPS = @HAVE_GETGROUPS@
-HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
-HAVE_GETLOGIN = @HAVE_GETLOGIN@
-HAVE_GETOPT_H = @HAVE_GETOPT_H@
-HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
-HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
-HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
-HAVE_GRANTPT = @HAVE_GRANTPT@
-HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
-HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
-HAVE_ISWBLANK = @HAVE_ISWBLANK@
-HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
-HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
-HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
-HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
-HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
-HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
-HAVE_LCHMOD = @HAVE_LCHMOD@
-HAVE_LCHOWN = @HAVE_LCHOWN@
-HAVE_LINK = @HAVE_LINK@
-HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
-HAVE_LSTAT = @HAVE_LSTAT@
-HAVE_MBRLEN = @HAVE_MBRLEN@
-HAVE_MBRTOWC = @HAVE_MBRTOWC@
-HAVE_MBSINIT = @HAVE_MBSINIT@
-HAVE_MBSLEN = @HAVE_MBSLEN@
-HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
-HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
-HAVE_MEMPCPY = @HAVE_MEMPCPY@
-HAVE_MKDIRAT = @HAVE_MKDIRAT@
-HAVE_MKDTEMP = @HAVE_MKDTEMP@
-HAVE_MKFIFO = @HAVE_MKFIFO@
-HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
-HAVE_MKNOD = @HAVE_MKNOD@
-HAVE_MKNODAT = @HAVE_MKNODAT@
-HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
-HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
-HAVE_MKSTEMP = @HAVE_MKSTEMP@
-HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
-HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
-HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
-HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
-HAVE_OPENAT = @HAVE_OPENAT@
-HAVE_OS_H = @HAVE_OS_H@
-HAVE_PCLOSE = @HAVE_PCLOSE@
-HAVE_PIPE = @HAVE_PIPE@
-HAVE_PIPE2 = @HAVE_PIPE2@
-HAVE_POPEN = @HAVE_POPEN@
-HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
-HAVE_PREAD = @HAVE_PREAD@
-HAVE_PTSNAME = @HAVE_PTSNAME@
-HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
-HAVE_PWRITE = @HAVE_PWRITE@
-HAVE_RANDOM = @HAVE_RANDOM@
-HAVE_RANDOM_H = @HAVE_RANDOM_H@
-HAVE_RANDOM_R = @HAVE_RANDOM_R@
-HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
-HAVE_READLINK = @HAVE_READLINK@
-HAVE_READLINKAT = @HAVE_READLINKAT@
-HAVE_REALPATH = @HAVE_REALPATH@
-HAVE_RENAMEAT = @HAVE_RENAMEAT@
-HAVE_RPMATCH = @HAVE_RPMATCH@
-HAVE_SETENV = @HAVE_SETENV@
-HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
-HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
-HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
-HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
-HAVE_SLEEP = @HAVE_SLEEP@
-HAVE_STDINT_H = @HAVE_STDINT_H@
-HAVE_STPCPY = @HAVE_STPCPY@
-HAVE_STPNCPY = @HAVE_STPNCPY@
-HAVE_STRCASESTR = @HAVE_STRCASESTR@
-HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
-HAVE_STRPBRK = @HAVE_STRPBRK@
-HAVE_STRPTIME = @HAVE_STRPTIME@
-HAVE_STRSEP = @HAVE_STRSEP@
-HAVE_STRTOD = @HAVE_STRTOD@
-HAVE_STRTOLL = @HAVE_STRTOLL@
-HAVE_STRTOULL = @HAVE_STRTOULL@
-HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
-HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
-HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
-HAVE_SYMLINK = @HAVE_SYMLINK@
-HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
-HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
-HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
-HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
-HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
-HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
-HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
-HAVE_TIMEGM = @HAVE_TIMEGM@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_UNLINKAT = @HAVE_UNLINKAT@
-HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
-HAVE_USLEEP = @HAVE_USLEEP@
-HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
-HAVE_VASPRINTF = @HAVE_VASPRINTF@
-HAVE_VDPRINTF = @HAVE_VDPRINTF@
-HAVE_WCHAR_H = @HAVE_WCHAR_H@
-HAVE_WCHAR_T = @HAVE_WCHAR_T@
-HAVE_WCPCPY = @HAVE_WCPCPY@
-HAVE_WCPNCPY = @HAVE_WCPNCPY@
-HAVE_WCRTOMB = @HAVE_WCRTOMB@
-HAVE_WCSCASECMP = @HAVE_WCSCASECMP@
-HAVE_WCSCAT = @HAVE_WCSCAT@
-HAVE_WCSCHR = @HAVE_WCSCHR@
-HAVE_WCSCMP = @HAVE_WCSCMP@
-HAVE_WCSCOLL = @HAVE_WCSCOLL@
-HAVE_WCSCPY = @HAVE_WCSCPY@
-HAVE_WCSCSPN = @HAVE_WCSCSPN@
-HAVE_WCSDUP = @HAVE_WCSDUP@
-HAVE_WCSLEN = @HAVE_WCSLEN@
-HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@
-HAVE_WCSNCAT = @HAVE_WCSNCAT@
-HAVE_WCSNCMP = @HAVE_WCSNCMP@
-HAVE_WCSNCPY = @HAVE_WCSNCPY@
-HAVE_WCSNLEN = @HAVE_WCSNLEN@
-HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
-HAVE_WCSPBRK = @HAVE_WCSPBRK@
-HAVE_WCSRCHR = @HAVE_WCSRCHR@
-HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
-HAVE_WCSSPN = @HAVE_WCSSPN@
-HAVE_WCSSTR = @HAVE_WCSSTR@
-HAVE_WCSTOK = @HAVE_WCSTOK@
-HAVE_WCSWIDTH = @HAVE_WCSWIDTH@
-HAVE_WCSXFRM = @HAVE_WCSXFRM@
-HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
-HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
-HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
-HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
-HAVE_WINT_T = @HAVE_WINT_T@
-HAVE_WMEMCHR = @HAVE_WMEMCHR@
-HAVE_WMEMCMP = @HAVE_WMEMCMP@
-HAVE_WMEMCPY = @HAVE_WMEMCPY@
-HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
-HAVE_WMEMSET = @HAVE_WMEMSET@
-HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
-HAVE__EXIT = @HAVE__EXIT@
-INCLUDE_NEXT = @INCLUDE_NEXT@
-INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTLLIBS = @INTLLIBS@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
-LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
-LIB_ACL = @LIB_ACL@
-LIB_SELINUX = @LIB_SELINUX@
-LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
-LOCALE_FR = @LOCALE_FR@
-LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
-LOCALE_JA = @LOCALE_JA@
-LOCALE_ZH_CN = @LOCALE_ZH_CN@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
-NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
-NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
-NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
-NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@
-NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
-NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
-NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
-NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
-NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
-NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
-NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
-NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
-NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
-NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
-NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
-NEXT_ERRNO_H = @NEXT_ERRNO_H@
-NEXT_FCNTL_H = @NEXT_FCNTL_H@
-NEXT_GETOPT_H = @NEXT_GETOPT_H@
-NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
-NEXT_LOCALE_H = @NEXT_LOCALE_H@
-NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@
-NEXT_STDARG_H = @NEXT_STDARG_H@
-NEXT_STDDEF_H = @NEXT_STDDEF_H@
-NEXT_STDINT_H = @NEXT_STDINT_H@
-NEXT_STDIO_H = @NEXT_STDIO_H@
-NEXT_STDLIB_H = @NEXT_STDLIB_H@
-NEXT_STRING_H = @NEXT_STRING_H@
-NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
-NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
-NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
-NEXT_TIME_H = @NEXT_TIME_H@
-NEXT_UNISTD_H = @NEXT_UNISTD_H@
-NEXT_WCHAR_H = @NEXT_WCHAR_H@
-NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
-PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
-PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
-RANLIB = @RANLIB@
-REPLACE_BTOWC = @REPLACE_BTOWC@
-REPLACE_CALLOC = @REPLACE_CALLOC@
-REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
-REPLACE_CHOWN = @REPLACE_CHOWN@
-REPLACE_CLOSE = @REPLACE_CLOSE@
-REPLACE_DPRINTF = @REPLACE_DPRINTF@
-REPLACE_DUP = @REPLACE_DUP@
-REPLACE_DUP2 = @REPLACE_DUP2@
-REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
-REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
-REPLACE_FCLOSE = @REPLACE_FCLOSE@
-REPLACE_FCNTL = @REPLACE_FCNTL@
-REPLACE_FDOPEN = @REPLACE_FDOPEN@
-REPLACE_FFLUSH = @REPLACE_FFLUSH@
-REPLACE_FOPEN = @REPLACE_FOPEN@
-REPLACE_FPRINTF = @REPLACE_FPRINTF@
-REPLACE_FPURGE = @REPLACE_FPURGE@
-REPLACE_FREOPEN = @REPLACE_FREOPEN@
-REPLACE_FSEEK = @REPLACE_FSEEK@
-REPLACE_FSEEKO = @REPLACE_FSEEKO@
-REPLACE_FSTAT = @REPLACE_FSTAT@
-REPLACE_FSTATAT = @REPLACE_FSTATAT@
-REPLACE_FTELL = @REPLACE_FTELL@
-REPLACE_FTELLO = @REPLACE_FTELLO@
-REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
-REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
-REPLACE_GETCWD = @REPLACE_GETCWD@
-REPLACE_GETDELIM = @REPLACE_GETDELIM@
-REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
-REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
-REPLACE_GETLINE = @REPLACE_GETLINE@
-REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
-REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
-REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
-REPLACE_ISATTY = @REPLACE_ISATTY@
-REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
-REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
-REPLACE_LCHOWN = @REPLACE_LCHOWN@
-REPLACE_LINK = @REPLACE_LINK@
-REPLACE_LINKAT = @REPLACE_LINKAT@
-REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
-REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
-REPLACE_LSEEK = @REPLACE_LSEEK@
-REPLACE_LSTAT = @REPLACE_LSTAT@
-REPLACE_MALLOC = @REPLACE_MALLOC@
-REPLACE_MBRLEN = @REPLACE_MBRLEN@
-REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
-REPLACE_MBSINIT = @REPLACE_MBSINIT@
-REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
-REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
-REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
-REPLACE_MBTOWC = @REPLACE_MBTOWC@
-REPLACE_MEMCHR = @REPLACE_MEMCHR@
-REPLACE_MEMMEM = @REPLACE_MEMMEM@
-REPLACE_MKDIR = @REPLACE_MKDIR@
-REPLACE_MKFIFO = @REPLACE_MKFIFO@
-REPLACE_MKNOD = @REPLACE_MKNOD@
-REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
-REPLACE_MKTIME = @REPLACE_MKTIME@
-REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
-REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
-REPLACE_NULL = @REPLACE_NULL@
-REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
-REPLACE_OPEN = @REPLACE_OPEN@
-REPLACE_OPENAT = @REPLACE_OPENAT@
-REPLACE_PERROR = @REPLACE_PERROR@
-REPLACE_POPEN = @REPLACE_POPEN@
-REPLACE_PREAD = @REPLACE_PREAD@
-REPLACE_PRINTF = @REPLACE_PRINTF@
-REPLACE_PTSNAME = @REPLACE_PTSNAME@
-REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
-REPLACE_PUTENV = @REPLACE_PUTENV@
-REPLACE_PWRITE = @REPLACE_PWRITE@
-REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
-REPLACE_READ = @REPLACE_READ@
-REPLACE_READLINK = @REPLACE_READLINK@
-REPLACE_REALLOC = @REPLACE_REALLOC@
-REPLACE_REALPATH = @REPLACE_REALPATH@
-REPLACE_REMOVE = @REPLACE_REMOVE@
-REPLACE_RENAME = @REPLACE_RENAME@
-REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
-REPLACE_RMDIR = @REPLACE_RMDIR@
-REPLACE_SETENV = @REPLACE_SETENV@
-REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
-REPLACE_SLEEP = @REPLACE_SLEEP@
-REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
-REPLACE_SPRINTF = @REPLACE_SPRINTF@
-REPLACE_STAT = @REPLACE_STAT@
-REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
-REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
-REPLACE_STPNCPY = @REPLACE_STPNCPY@
-REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
-REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
-REPLACE_STRDUP = @REPLACE_STRDUP@
-REPLACE_STRERROR = @REPLACE_STRERROR@
-REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
-REPLACE_STRNCAT = @REPLACE_STRNCAT@
-REPLACE_STRNDUP = @REPLACE_STRNDUP@
-REPLACE_STRNLEN = @REPLACE_STRNLEN@
-REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
-REPLACE_STRSTR = @REPLACE_STRSTR@
-REPLACE_STRTOD = @REPLACE_STRTOD@
-REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
-REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
-REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
-REPLACE_SYMLINK = @REPLACE_SYMLINK@
-REPLACE_TIMEGM = @REPLACE_TIMEGM@
-REPLACE_TMPFILE = @REPLACE_TMPFILE@
-REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
-REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
-REPLACE_UNLINK = @REPLACE_UNLINK@
-REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
-REPLACE_UNSETENV = @REPLACE_UNSETENV@
-REPLACE_USLEEP = @REPLACE_USLEEP@
-REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
-REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
-REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
-REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
-REPLACE_VPRINTF = @REPLACE_VPRINTF@
-REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
-REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
-REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
-REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
-REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
-REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
-REPLACE_WCTOB = @REPLACE_WCTOB@
-REPLACE_WCTOMB = @REPLACE_WCTOMB@
-REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
-REPLACE_WRITE = @REPLACE_WRITE@
-SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
-SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
-SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
-STDDEF_H = @STDDEF_H@
-STDINT_H = @STDINT_H@
-STRIP = @STRIP@
-SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
-TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
-UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
-USE_ACL = @USE_ACL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
-WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
-WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
-WINT_T_SUFFIX = @WINT_T_SUFFIX@
-XFAIL_TESTS = @XFAIL_TESTS@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-gl_LIBOBJS = @gl_LIBOBJS@
-gl_LTLIBOBJS = @gl_LTLIBOBJS@
-gltests_LIBOBJS = @gltests_LIBOBJS@
-gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
-gltests_WITNESS = @gltests_WITNESS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-lispdir = @lispdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
-TESTS = $(check_PROGRAMS) $(SEDTESTS)
-SEDTESTS = $(am__append_1) appquit enable sep inclib 8bit newjis xabcx \
- dollar noeol noeolw modulo numsub numsub2 numsub3 numsub4 \
- numsub5 0range bkslashes head madding mac-mf empty xbxcx \
- xbxcx3 recall recall2 xemacs fasts uniq manis khadafy linecnt \
- eval distrib 8to7 y-bracket y-newline allsub cv-vars classes \
- middle bsd stdin flipcase insens subwrite writeout readin \
- insert utf8-1 utf8-2 utf8-3 utf8-4 badenc inplace-hold \
- brackets amp-escape help version file quiet factor binary3 \
- binary2 binary dc
-LDADD = ../lib/libsed.a @INTLLIBS@
-noinst_HEADERS = testcases.h ptestcases.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" \
- @LOCALCHARSET_TESTS_ENVIRONMENT@ $(srcdir)/runtest
-
-EXTRA_DIST = \
- PCRE.tests BOOST.tests SPENCER.tests \
- runtest Makefile.tests \
- 0range.good 0range.inp 0range.sed \
- 8bit.good 8bit.inp 8bit.sed \
- 8to7.good 8to7.inp 8to7.sed \
- allsub.good allsub.inp allsub.sed \
- amp-escape.good amp-escape.inp amp-escape.sed \
- appquit.good appquit.inp appquit.sed \
- binary.good binary.inp binary.sed binary2.sed binary3.sed \
- bkslashes.good bkslashes.inp bkslashes.sed \
- brackets.good brackets.inp brackets.sed \
- bsd.good bsd.sh \
- cv-vars.good cv-vars.inp cv-vars.sed \
- classes.good classes.inp classes.sed \
- dc.good dc.inp dc.sed \
- distrib.good distrib.inp distrib.sed distrib.sh \
- dollar.good dollar.inp dollar.sed \
- empty.good empty.inp empty.sed \
- enable.good enable.inp enable.sed \
- eval.good eval.inp eval.sed \
- factor.good factor.inp factor.sed \
- fasts.good fasts.inp fasts.sed \
- flipcase.good flipcase.inp flipcase.sed \
- head.good head.inp head.sed \
- inclib.good inclib.inp inclib.sed \
- insens.good insens.inp insens.sed \
- insert.good insert.inp insert.sed \
- khadafy.good khadafy.inp khadafy.sed \
- linecnt.good linecnt.inp linecnt.sed \
- space.good space.inp space.sed \
- mac-mf.good mac-mf.inp mac-mf.sed \
- madding.good madding.inp madding.sed \
- manis.good manis.inp manis.sed \
- middle.good middle.sed middle.inp \
- modulo.good modulo.sed modulo.inp \
- newjis.good newjis.inp newjis.sed \
- noeol.good noeol.inp noeol.sed \
- noeolw.good noeolw.1good noeolw.2good noeolw.sed \
- numsub.good numsub.inp numsub.sed \
- numsub2.good numsub2.inp numsub2.sed \
- numsub3.good numsub3.inp numsub3.sed \
- numsub4.good numsub4.inp numsub4.sed \
- numsub5.good numsub5.inp numsub5.sed \
- readin.good readin.inp readin.sed \
- recall.good recall.inp recall.sed \
- recall2.good recall2.inp recall2.sed \
- sep.good sep.inp sep.sed \
- subwrite.inp subwrite.sed subwrt1.good subwrt2.good \
- uniq.good uniq.inp uniq.sed \
- utf8-1.good utf8-1.inp utf8-1.sed \
- utf8-2.good utf8-2.inp utf8-2.sed \
- utf8-3.good utf8-3.inp utf8-3.sed \
- utf8-4.good utf8-4.inp utf8-4.sed \
- badenc.good badenc.inp badenc.sed \
- version.gin \
- writeout.inp writeout.sed wrtout1.good wrtout2.good \
- xabcx.good xabcx.inp xabcx.sed \
- xbxcx.good xbxcx.inp xbxcx.sed \
- xbxcx3.good xbxcx3.inp xbxcx3.sed \
- xemacs.good xemacs.inp xemacs.sed \
- y-bracket.good y-bracket.sed y-bracket.inp \
- y-newline.good y-newline.sed y-newline.inp
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits testsuite/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --gnits testsuite/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-version.good: $(top_builddir)/config.status $(srcdir)/version.gin
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-clean-checkPROGRAMS:
- -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
-bug-regex10$(EXEEXT): $(bug_regex10_OBJECTS) $(bug_regex10_DEPENDENCIES) $(EXTRA_bug_regex10_DEPENDENCIES)
- @rm -f bug-regex10$(EXEEXT)
- $(LINK) $(bug_regex10_OBJECTS) $(bug_regex10_LDADD) $(LIBS)
-bug-regex11$(EXEEXT): $(bug_regex11_OBJECTS) $(bug_regex11_DEPENDENCIES) $(EXTRA_bug_regex11_DEPENDENCIES)
- @rm -f bug-regex11$(EXEEXT)
- $(LINK) $(bug_regex11_OBJECTS) $(bug_regex11_LDADD) $(LIBS)
-bug-regex12$(EXEEXT): $(bug_regex12_OBJECTS) $(bug_regex12_DEPENDENCIES) $(EXTRA_bug_regex12_DEPENDENCIES)
- @rm -f bug-regex12$(EXEEXT)
- $(LINK) $(bug_regex12_OBJECTS) $(bug_regex12_LDADD) $(LIBS)
-bug-regex13$(EXEEXT): $(bug_regex13_OBJECTS) $(bug_regex13_DEPENDENCIES) $(EXTRA_bug_regex13_DEPENDENCIES)
- @rm -f bug-regex13$(EXEEXT)
- $(LINK) $(bug_regex13_OBJECTS) $(bug_regex13_LDADD) $(LIBS)
-bug-regex14$(EXEEXT): $(bug_regex14_OBJECTS) $(bug_regex14_DEPENDENCIES) $(EXTRA_bug_regex14_DEPENDENCIES)
- @rm -f bug-regex14$(EXEEXT)
- $(LINK) $(bug_regex14_OBJECTS) $(bug_regex14_LDADD) $(LIBS)
-bug-regex15$(EXEEXT): $(bug_regex15_OBJECTS) $(bug_regex15_DEPENDENCIES) $(EXTRA_bug_regex15_DEPENDENCIES)
- @rm -f bug-regex15$(EXEEXT)
- $(LINK) $(bug_regex15_OBJECTS) $(bug_regex15_LDADD) $(LIBS)
-bug-regex16$(EXEEXT): $(bug_regex16_OBJECTS) $(bug_regex16_DEPENDENCIES) $(EXTRA_bug_regex16_DEPENDENCIES)
- @rm -f bug-regex16$(EXEEXT)
- $(LINK) $(bug_regex16_OBJECTS) $(bug_regex16_LDADD) $(LIBS)
-bug-regex21$(EXEEXT): $(bug_regex21_OBJECTS) $(bug_regex21_DEPENDENCIES) $(EXTRA_bug_regex21_DEPENDENCIES)
- @rm -f bug-regex21$(EXEEXT)
- $(LINK) $(bug_regex21_OBJECTS) $(bug_regex21_LDADD) $(LIBS)
-bug-regex27$(EXEEXT): $(bug_regex27_OBJECTS) $(bug_regex27_DEPENDENCIES) $(EXTRA_bug_regex27_DEPENDENCIES)
- @rm -f bug-regex27$(EXEEXT)
- $(LINK) $(bug_regex27_OBJECTS) $(bug_regex27_LDADD) $(LIBS)
-bug-regex28$(EXEEXT): $(bug_regex28_OBJECTS) $(bug_regex28_DEPENDENCIES) $(EXTRA_bug_regex28_DEPENDENCIES)
- @rm -f bug-regex28$(EXEEXT)
- $(LINK) $(bug_regex28_OBJECTS) $(bug_regex28_LDADD) $(LIBS)
-bug-regex7$(EXEEXT): $(bug_regex7_OBJECTS) $(bug_regex7_DEPENDENCIES) $(EXTRA_bug_regex7_DEPENDENCIES)
- @rm -f bug-regex7$(EXEEXT)
- $(LINK) $(bug_regex7_OBJECTS) $(bug_regex7_LDADD) $(LIBS)
-bug-regex8$(EXEEXT): $(bug_regex8_OBJECTS) $(bug_regex8_DEPENDENCIES) $(EXTRA_bug_regex8_DEPENDENCIES)
- @rm -f bug-regex8$(EXEEXT)
- $(LINK) $(bug_regex8_OBJECTS) $(bug_regex8_LDADD) $(LIBS)
-bug-regex9$(EXEEXT): $(bug_regex9_OBJECTS) $(bug_regex9_DEPENDENCIES) $(EXTRA_bug_regex9_DEPENDENCIES)
- @rm -f bug-regex9$(EXEEXT)
- $(LINK) $(bug_regex9_OBJECTS) $(bug_regex9_LDADD) $(LIBS)
-runptests$(EXEEXT): $(runptests_OBJECTS) $(runptests_DEPENDENCIES) $(EXTRA_runptests_DEPENDENCIES)
- @rm -f runptests$(EXEEXT)
- $(LINK) $(runptests_OBJECTS) $(runptests_LDADD) $(LIBS)
-runtests$(EXEEXT): $(runtests_OBJECTS) $(runtests_DEPENDENCIES) $(EXTRA_runtests_DEPENDENCIES)
- @rm -f runtests$(EXEEXT)
- $(LINK) $(runtests_OBJECTS) $(runtests_LDADD) $(LIBS)
-tst-boost$(EXEEXT): $(tst_boost_OBJECTS) $(tst_boost_DEPENDENCIES) $(EXTRA_tst_boost_DEPENDENCIES)
- @rm -f tst-boost$(EXEEXT)
- $(LINK) $(tst_boost_OBJECTS) $(tst_boost_LDADD) $(LIBS)
-tst-pcre$(EXEEXT): $(tst_pcre_OBJECTS) $(tst_pcre_DEPENDENCIES) $(EXTRA_tst_pcre_DEPENDENCIES)
- @rm -f tst-pcre$(EXEEXT)
- $(LINK) $(tst_pcre_OBJECTS) $(tst_pcre_LDADD) $(LIBS)
-tst-regex2$(EXEEXT): $(tst_regex2_OBJECTS) $(tst_regex2_DEPENDENCIES) $(EXTRA_tst_regex2_DEPENDENCIES)
- @rm -f tst-regex2$(EXEEXT)
- $(LINK) $(tst_regex2_OBJECTS) $(tst_regex2_LDADD) $(LIBS)
-tst-rxspencer$(EXEEXT): $(tst_rxspencer_OBJECTS) $(tst_rxspencer_DEPENDENCIES) $(EXTRA_tst_rxspencer_DEPENDENCIES)
- @rm -f tst-rxspencer$(EXEEXT)
- $(LINK) $(tst_rxspencer_OBJECTS) $(tst_rxspencer_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex10.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex11.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex12.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex13.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex14.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex15.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex16.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex21.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex27.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex28.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex7.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex8.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex9.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runptests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runtests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-boost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-pcre.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-regex2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-rxspencer.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: check-am install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic cscopelist ctags distclean \
- distclean-compile distclean-generic distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am
-
-
-# automake makes `check' depend on $(TESTS). Declare
-# dummy targets for $(TESTS) so that make does not complain.
-
-.PHONY: $(SEDTESTS)
-$(SEDTESTS):
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/testsuite/Makefile.tests b/testsuite/Makefile.tests
index 7aaf622..00a4ec8 100644
--- a/testsuite/Makefile.tests
+++ b/testsuite/Makefile.tests
@@ -4,7 +4,7 @@ SHELL = /bin/sh
# These are only fallback values. They are usually overridden by runtest.
srcdir = .
-SED = ../sed/sed
+SED = ./sed/sed
TIME=
#TIME=time
@@ -15,48 +15,55 @@ TR = $(SEDENV_2) tr
CMP=cmp
RM=rm -f
+elide_cr = $(SEDENV_2) $(SED) 's/\r//g'
SKIP = :>$@.skip; exit 77
enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo \
-y-bracket y-newline insert brackets amp-escape::
+y-bracket y-newline y-zero insert brackets amp-escape newline-anchor::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
0range::
$(SEDENV) $(SED) -s -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
+
+zero-anchor::
+ $(SEDENV) $(SED) -z -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
badenc::
LC_ALL=ru_RU.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
LC_ALL=it_IT.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
LC_ALL=en_US.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
LC_ALL=en_GB.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
# Try with ru_RU.UTF-8. If it is presumably not installed, see if the current
# locale is UTF-8 and run it in the current locale.
utf8-1 utf8-2 utf8-3 utf8-4::
echo "LC_ALL=ru_RU.UTF-8" \
"$(TIME) $(SED) -f $(srcdir)/$@.sed" \
- "< $(srcdir)/$@.inp | $(TR) -d \\r > $@.out"; \
+ "< $(srcdir)/$@.inp | $(elide_cr) > $@.out"; \
LC_ALL=ru_RU.UTF-8 \
$(TIME) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out; \
$(CMP) $(srcdir)/$@.good $@.out && exit 0; \
$(CMP) $(srcdir)/$@.inp $@.out || exit 1; \
locale > $@.info 2>/dev/null || { rm $@.info; $(SKIP); }; \
@@ -64,9 +71,9 @@ utf8-1 utf8-2 utf8-3 utf8-4::
case "$$LC_CTYPE" in \
*UTF-8 | *UTF8 | *utf8 | *utf-8) \
echo "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
- " < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out"; \
+ " < $(srcdir)/$@.inp | $(elide_cr) > $@.out"; \
$(TIME) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out; \
$(CMP) $(srcdir)/$@.good $@.out && exit 0; \
$(CMP) $(srcdir)/$@.inp $@.out || exit 1 ;; \
*) ;; \
@@ -76,60 +83,60 @@ utf8-1 utf8-2 utf8-3 utf8-4::
# This checks for a bug in 3.02 and 3.02.80
stdin::
($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp \
- | $(TR) -d \\r > $@.1out
+ | $(elide_cr) > $@.1out
$(SEDENV) cat $(srcdir)/numsub.inp \
- | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) | $(TR) -d \\r > $@.2out
- $(CMP) $@.1out $@.2out
- @$(RM) $@.1out $@.2out
+ | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) | $(elide_cr) > $@.2out
+ $(CMP) $@.1out $@.2out
+ @$(RM) $@.1out $@.2out
inplace-hold::
echo x > $@.1out
echo y > $@.2out
echo > $@.out
- $(SEDENV) $(SED) -i x $@.1out $@.2out
- $(CMP) $@.1out $@.out
- $(CMP) $@.2out $@.out
+ $(SEDENV) $(SED) -i x $@.1out $@.2out
+ $(CMP) $@.1out $@.out
+ $(CMP) $@.2out $@.out
@$(RM) $@.1out $@.2out $@.out
cv-vars classes middle dc distrib factor numsub2 numsub3 numsub4 numsub5 \
insens::
$(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
noeolw::
$(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- $(srcdir)/noeol.inp $(srcdir)/noeol.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- $(TR) -d \\r < $@.1out | $(CMP) $(srcdir)/$@.1good -
- $(TR) -d \\r < $@.2out | $(CMP) $(srcdir)/$@.2good -
+ $(srcdir)/noeol.inp $(srcdir)/noeol.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ $(elide_cr) < $@.1out | $(CMP) $(srcdir)/$@.1good -
+ $(elide_cr) < $@.2out | $(CMP) $(srcdir)/$@.2good -
@$(RM) $@.1out $@.2out $@.out
subwrite::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.1out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.1out
$(CMP) $(srcdir)/subwrt1.good $@.1out
- $(TR) -d \\r < $@.wout | $(CMP) $(srcdir)/subwrt2.good -
+ $(elide_cr) < $@.wout | $(CMP) $(srcdir)/subwrt2.good -
@$(RM) $@.1out $@.wout
bsd::
$(SEDENV_2) sh $(srcdir)/$@.sh '$(TIME) $(SED)' $@.out
- $(TR) -d \\r < $@.out | $(CMP) $(srcdir)/$@.good -
- @$(RM) $@.out
+ $(elide_cr) < $@.out | $(CMP) $(srcdir)/$@.good -
+ @$(RM) $@.out
writeout::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.1out
- $(CMP) $(srcdir)/wrtout1.good $@.1out
- $(TR) -d \\r < $@.wout | $(CMP) $(srcdir)/wrtout2.good -
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.1out
+ $(CMP) $(srcdir)/wrtout1.good $@.1out
+ $(elide_cr) < $@.wout | $(CMP) $(srcdir)/wrtout2.good -
@$(RM) $@.1out $@.wout
readin::
echo MOO | $(SEDENV) $(SED) b > $@.in2
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out $@.in2
eval.in2: $(srcdir)/eval.inp
@@ -137,15 +144,15 @@ eval.in2: $(srcdir)/eval.inp
eval:: eval.in2
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/$@.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
binary binary2 binary3::
$(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- < $(srcdir)/binary.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/binary.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/binary.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/binary.good $@.out
+ @$(RM) $@.out
#
# cmdlines targets
@@ -153,27 +160,27 @@ binary binary2 binary3::
help::
$(SEDENV) $(SED) --help | grep E-mail > /dev/null 2>&1
- $(SEDENV) $(SED) --help | $(SEDENV) $(SED) '1s/ [^ ]* / sed /; /^E-mail/,$$d' > $@.1out
+ $(SEDENV) $(SED) --help | $(SEDENV) $(SED) '1s/ [^ ]* / sed /; /^E-mail/,$$d' > $@.1out
$(SEDENV) $(SED) 2>&1 | $(SEDENV) $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
- $(CMP) $@.1out $@.2out
+ $(CMP) $@.1out $@.2out
@$(RM) $@.1out $@.2out
version::
- $(SEDENV) $(SED) --version 2>&1 | $(TR) -d \\r > $@.out
- $(CMP) $@.good $@.out
+ $(SEDENV) $(SED) --version 2>&1 | $(elide_cr) > $@.out
+ $(CMP) $@.good $@.out
@$(RM) $@.out
file::
$(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
- < $(srcdir)/newjis.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/newjis.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/newjis.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/newjis.good $@.out
+ @$(RM) $@.out
quiet::
$(SEDENV) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
- < $(srcdir)/cv-vars.inp | $(TR) -d \\r > $@.out
- $(CMP) $(srcdir)/cv-vars.good $@.out
- @$(RM) $@.out
+ < $(srcdir)/cv-vars.inp | $(elide_cr) > $@.out
+ $(CMP) $(srcdir)/cv-vars.good $@.out
+ @$(RM) $@.out
# The following target is not used in super sed builds (only GNU sed)
diff --git a/testsuite/PCRE.tests b/testsuite/PCRE.tests
index 0fb9cad..7816dce 100644
--- a/testsuite/PCRE.tests
+++ b/testsuite/PCRE.tests
@@ -552,21 +552,21 @@ No match
1: cataract
2: aract
3: ract
- 4:
+ 4:
5: 3
catatonic catatonic23
0: catatonic catatonic23
1: catatonic
2: atonic
3: tonic
- 4:
+ 4:
5: 3
caterpillar caterpillar23
0: caterpillar caterpillar23
1: caterpillar
2: erpillar
3: <unset>
- 4:
+ 4:
5: 3
@@ -578,10 +578,10 @@ No match
/^From\s+\S+\s+([a-zA-Z]{3}\s+){2}[0-9]{1,2}\s+[0-9][0-9]:[0-9][0-9]/
From abcd Mon Sep 01 12:33:02 1997
0: From abcd Mon Sep 01 12:33
- 1: Sep
+ 1: Sep
From abcd Mon Sep 1 12:33:02 1997
0: From abcd Mon Sep 1 12:33
- 1: Sep
+ 1: Sep
*** Failers
No match
From abcd Sep 01 12:33:02 1997
@@ -617,7 +617,7 @@ No match
2: bell
bell
0: bell
- 1:
+ 1:
2: bell
*** Failers
No match
@@ -633,7 +633,7 @@ No match
1: a
b
0: b
- 1:
+ 1:
*** Failers
No match
ab
@@ -645,7 +645,7 @@ No match
1: a
b
0: b
- 1:
+ 1:
*** Failers
No match
ab
@@ -664,7 +664,7 @@ No match
1: a
b
0: b
- 1:
+ 1:
*** Failers
No match
ab
@@ -781,7 +781,7 @@ No match
0: baccc
1: b
2: a
- 3:
+ 3:
4: ccc
*** Failers
0: *** Failers
@@ -799,7 +799,7 @@ No match
0: A
/[^a]/i
- Abc
+ Abc
0: b
/[^a]+/
@@ -831,7 +831,7 @@ No match
No match
akb
No match
- akk
+ akk
No match
/^[0-9]{8,}@.+[^k]$/
@@ -843,7 +843,7 @@ No match
No match
12345678@x.y.uk
No match
- 1234567@a.b.c.d
+ 1234567@a.b.c.d
No match
/(a)\1{8,}/
@@ -855,31 +855,31 @@ No match
1: a
*** Failers
No match
- aaaaaaa
+ aaaaaaa
No match
/[^a]/
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: A
/[^a]/i
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: b
/[^az]/
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: A
/[^az]/i
aaaabcd
0: b
- aaAabcd
+ aaAabcd
0: b
/P[^*]TAIRE[^*]{1,6}LL/
@@ -894,30 +894,30 @@ No match
1.230003938
0: .230003938
1: .23
- 1.875000282
+ 1.875000282
0: .875000282
1: .875
- 1.235
+ 1.235
0: .235
1: .23
-
+
/\b(foo)\s+(\w+)/i
Food is on the foo table
0: foo table
1: foo
2: table
-
+
/foo(.*)bar/
The food is under the bar in the barn.
0: food is under the bar in the bar
- 1: d is under the bar in the
-
+ 1: d is under the bar in the
+
/(.*)([0-9]*)/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
1: I have 2 numbers: 53147
- 2:
-
+ 2:
+
/(.*)([0-9]+)/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
@@ -933,13 +933,13 @@ No match
/(.*)\b([0-9]+)$/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
- 1: I have 2 numbers:
+ 1: I have 2 numbers:
2: 53147
/(.*[^0-9])([0-9]+)$/
I have 2 numbers: 53147
0: I have 2 numbers: 53147
- 1: I have 2 numbers:
+ 1: I have 2 numbers:
2: 53147
/[[:digit:]][[:digit:]]\/[[:digit:]][[:digit:]]\/[[:digit:]][[:digit:]][[:digit:]][[:digit:]]/
@@ -948,48 +948,48 @@ No match
/^(a){0,0}/
bcd
- 0:
+ 0:
abc
- 0:
- aab
- 0:
+ 0:
+ aab
+ 0:
/^(a){0,1}/
bcd
- 0:
+ 0:
abc
0: a
1: a
- aab
+ aab
0: a
1: a
/^(a){0,2}/
bcd
- 0:
+ 0:
abc
0: a
1: a
- aab
+ aab
0: aa
1: a
/^(a){0,3}/
bcd
- 0:
+ 0:
abc
0: a
1: a
aab
0: aa
1: a
- aaa
+ aaa
0: aaa
1: a
/^(a){0,}/
bcd
- 0:
+ 0:
abc
0: a
1: a
@@ -999,7 +999,7 @@ No match
aaa
0: aaa
1: a
- aaaaaaaa
+ aaaaaaaa
0: aaaaaaaa
1: a
@@ -1009,7 +1009,7 @@ No match
abc
0: a
1: a
- aab
+ aab
0: a
1: a
@@ -1019,7 +1019,7 @@ No match
abc
0: a
1: a
- aab
+ aab
0: aa
1: a
@@ -1032,7 +1032,7 @@ No match
aab
0: aa
1: a
- aaa
+ aaa
0: aaa
1: a
@@ -1048,7 +1048,7 @@ No match
aaa
0: aaa
1: a
- aaaaaaaa
+ aaaaaaaa
0: aaaaaaaa
1: a
@@ -1057,28 +1057,28 @@ No match
0: 123456654321
/^[[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]/
- 123456654321
+ 123456654321
0: 123456654321
/^[abc]{12}/
abcabcabcabc
0: abcabcabcabc
-
+
/^[a-c]{12}/
abcabcabcabc
0: abcabcabcabc
-
+
/^(a|b|c){12}/
- abcabcabcabc
+ abcabcabcabc
0: abcabcabcabc
1: c
/^[abcdefghijklmnopqrstuvwxy0123456789]/
n
0: n
- *** Failers
+ *** Failers
No match
- z
+ z
No match
/abcde{0,0}/
@@ -1086,7 +1086,7 @@ No match
0: abcd
*** Failers
No match
- abce
+ abce
No match
/ab[cd]{0,0}e/
@@ -1094,21 +1094,21 @@ No match
0: abe
*** Failers
No match
- abcde
+ abcde
No match
-
+
/ab(c){0,0}d/
abd
0: abd
*** Failers
No match
- abcd
+ abcd
No match
/a(b*)/
a
0: a
- 1:
+ 1:
ab
0: ab
1: b
@@ -1117,33 +1117,33 @@ No match
1: bbbb
*** Failers
0: a
- 1:
- bbbbb
+ 1:
+ bbbbb
No match
-
+
/ab[0-9]{0}e/
abe
0: abe
*** Failers
No match
- ab1e
+ ab1e
No match
-
+
/(A|B)*CD/
- CD
+ CD
0: CD
/(AB)*\1/
ABABAB
0: ABABAB
1: AB
-
+
/([0-9]+)(\w)/
12345a
0: 12345a
1: 12345
2: a
- 12345+
+ 12345+
0: 12345
1: 1234
2: 5
@@ -1158,15 +1158,15 @@ No match
abcabcabc
0: abcabcabc
1: abc
- xyz
- 0:
- 1:
+ xyz
+ 0:
+ 1:
/([a]*)*/
a
0: a
1: a
- aaaaa
+ aaaaa
0: aaaaa
1: aaaaa
@@ -1183,7 +1183,7 @@ No match
aaaabcde
0: aaaab
1: aaaab
- bbbb
+ bbbb
0: bbbb
1: bbbb
@@ -1194,15 +1194,15 @@ No match
bbbb
0: bbbb
1: bbbb
- aaa
- 0:
+ aaa
+ 0:
/([^ab]*)*/
cccc
0: cccc
1: cccc
- abab
- 0:
+ abab
+ 0:
/abc/
abc
@@ -1322,11 +1322,11 @@ No match
/^/
abc
- 0:
+ 0:
/$/
abc
- 0:
+ 0:
/a.c/
abc
@@ -1483,7 +1483,7 @@ No match
/()ef/
def
0: ef
- 1:
+ 1:
/a\(b/
a(b
@@ -1554,10 +1554,10 @@ No match
No match
b
No match
-
+
/a*/
-
+
/([abc])*d/
abbbcd
@@ -1600,7 +1600,7 @@ No match
/(abc|)ef/
abcdef
0: ef
- 1:
+ 1:
/(a|b)c*d/
abcd
@@ -1847,11 +1847,11 @@ No match
/^/i
ABC
- 0:
+ 0:
/$/i
ABC
- 0:
+ 0:
/a.c/i
ABC
@@ -1924,7 +1924,7 @@ No match
/()ef/i
DEF
0: EF
- 1:
+ 1:
/$b/i
*** Failers
@@ -2043,7 +2043,7 @@ No match
/(abc|)ef/i
ABCDEF
0: EF
- 1:
+ 1:
/(a|b)c*d/i
ABCD
@@ -2236,8 +2236,8 @@ No match
/^(){3,5}/
abc
- 0:
- 1:
+ 0:
+ 1:
/^(a+)*ax/
aax
@@ -2339,20 +2339,20 @@ No match
ZABCDEFG
0: ZA
1: A
- 2:
+ 2:
/(Z(())|A)*/
ZABCDEFG
0: ZA
1: A
- 2:
- 3:
+ 2:
+ 3:
/(.*)[0-9]+\1/
abc123abc
0: abc123abc
1: abc
- abc123bc
+ abc123bc
0: bc123bc
1: bc
@@ -2361,7 +2361,7 @@ No match
0: abc123abc
1: abc
2: abc
- abc123bc
+ abc123bc
0: bc123bc
1: bc
2: bc
diff --git a/testsuite/badenc.sed b/testsuite/badenc.sed
index dc80982..c46bb69 100644
--- a/testsuite/badenc.sed
+++ b/testsuite/badenc.sed
@@ -1 +1 @@
-/.*/ { H ; g ; s/\n// ; p ; z ; x }
+/.*/ { H ; g ; s/\n// ; p ; z ; x }
diff --git a/testsuite/binary.sed b/testsuite/binary.sed
index 92a6a06..e8ffd3b 100644
--- a/testsuite/binary.sed
+++ b/testsuite/binary.sed
@@ -37,23 +37,23 @@
# 255.255.255.0; 2 parameters => given host address and netmask compute
# network and broadcast addresses):
#
-# if [ $# = 1 ]; then
+# if [ $# = 1 ]; then
# OUTPUT='$1.$2.$3.$4'
# set 255.255.255.255 $1
# else
# OUTPUT='$1.$2.$3.$4 $5.$6.$7.$8'
# fi
-#
+#
# if [ `expr $2 : ".*\\."` -gt 0 ]; then
# MASK="$2 br b8<r b16<r b24< R|R|R|"
# else
# MASK="$2b 31b ^d D
# 11111111111111111111111111111111 x>1> x<1<"
# fi
-#
+#
# set `echo "$1 br b8<r b16<r b24< R|R|R| D # Load address
# $MASK D ~r # Load mask
-#
+#
# & DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# | DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# " | sed -f binary.sed`
diff --git a/testsuite/binary2.sed b/testsuite/binary2.sed
index daf7706..115b942 100644
--- a/testsuite/binary2.sed
+++ b/testsuite/binary2.sed
@@ -38,23 +38,23 @@
# 255.255.255.0; 2 parameters => given host address and netmask compute
# network and broadcast addresses):
#
-# if [ $# = 1 ]; then
+# if [ $# = 1 ]; then
# OUTPUT='$1.$2.$3.$4'
# set 255.255.255.255 $1
# else
# OUTPUT='$1.$2.$3.$4 $5.$6.$7.$8'
# fi
-#
+#
# if [ `expr $2 : ".*\\."` -gt 0 ]; then
# MASK="$2 br b8<r b16<r b24< R|R|R|"
# else
# MASK="$2b 31b ^d D
# 11111111111111111111111111111111 x>1> x<1<"
# fi
-#
+#
# set `echo "$1 br b8<r b16<r b24< R|R|R| D # Load address
# $MASK D ~r # Load mask
-#
+#
# & DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# | DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# " | sed -f binary.sed`
diff --git a/testsuite/binary3.sed b/testsuite/binary3.sed
index b877f14..ba6b7d1 100644
--- a/testsuite/binary3.sed
+++ b/testsuite/binary3.sed
@@ -41,23 +41,23 @@
# 255.255.255.0; 2 parameters => given host address and netmask compute
# network and broadcast addresses):
#
-# if [ $# = 1 ]; then
+# if [ $# = 1 ]; then
# OUTPUT='$1.$2.$3.$4'
# set 255.255.255.255 $1
# else
# OUTPUT='$1.$2.$3.$4 $5.$6.$7.$8'
# fi
-#
+#
# if [ `expr $2 : ".*\\."` -gt 0 ]; then
# MASK="$2 br b8<r b16<r b24< R|R|R|"
# else
# MASK="$2b 31b ^d D
# 11111111111111111111111111111111 x>1> x<1<"
# fi
-#
+#
# set `echo "$1 br b8<r b16<r b24< R|R|R| D # Load address
# $MASK D ~r # Load mask
-#
+#
# & DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# | DDD 24>dpP 16>11111111& dpP 8>11111111& dpP 11111111& dpP
# " | sed -f binary.sed`
diff --git a/testsuite/bug-regex10.c b/testsuite/bug-regex10.c
index 1a21617..cdb0a46 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 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <locale.h>
#include <stdio.h>
diff --git a/testsuite/bug-regex11.c b/testsuite/bug-regex11.c
index dbfa3f9..22a4bb0 100644
--- a/testsuite/bug-regex11.c
+++ b/testsuite/bug-regex11.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex12.c b/testsuite/bug-regex12.c
index a4db0cc..867e5fa 100644
--- a/testsuite/bug-regex12.c
+++ b/testsuite/bug-regex12.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex13.c b/testsuite/bug-regex13.c
index a28c5fa..d04f246 100644
--- a/testsuite/bug-regex13.c
+++ b/testsuite/bug-regex13.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex14.c b/testsuite/bug-regex14.c
index 4b296d8..f20b183 100644
--- a/testsuite/bug-regex14.c
+++ b/testsuite/bug-regex14.c
@@ -1,5 +1,5 @@
/* Tests re_comp and re_exec.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#define _REGEX_RE_COMP
#include <sys/types.h>
diff --git a/testsuite/bug-regex15.c b/testsuite/bug-regex15.c
index 14707e8..4d348a4 100644
--- a/testsuite/bug-regex15.c
+++ b/testsuite/bug-regex15.c
@@ -1,8 +1,6 @@
/* Test for memory/CPU leak in regcomp. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#include <sys/time.h>
diff --git a/testsuite/bug-regex16.c b/testsuite/bug-regex16.c
index 7a1d3c8..c767f42 100644
--- a/testsuite/bug-regex16.c
+++ b/testsuite/bug-regex16.c
@@ -1,8 +1,6 @@
/* Test re_compile_pattern error messages. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <stdio.h>
#include <string.h>
diff --git a/testsuite/bug-regex21.c b/testsuite/bug-regex21.c
index 0232876..53a975d 100644
--- a/testsuite/bug-regex21.c
+++ b/testsuite/bug-regex21.c
@@ -1,5 +1,5 @@
/* Test for memory leaks in regcomp.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#ifdef HAVE_MCHECK_H
#include <mcheck.h>
diff --git a/testsuite/bug-regex27.c b/testsuite/bug-regex27.c
index 340ade9..eb7ad5b 100644
--- a/testsuite/bug-regex27.c
+++ b/testsuite/bug-regex27.c
@@ -1,5 +1,5 @@
/* Test REG_NEWLINE.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 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 f546b35..42dadd3 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 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 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 2051985..6f3e435 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 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <locale.h>
#include <stdio.h>
diff --git a/testsuite/bug-regex8.c b/testsuite/bug-regex8.c
index e39ad59..dfb27b8 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 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Stepan Kasal <kasal@math.cas.cz>, 2002.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <locale.h>
#include <stdio.h>
diff --git a/testsuite/bug-regex9.c b/testsuite/bug-regex9.c
index c0e9e18..e4d41c1 100644
--- a/testsuite/bug-regex9.c
+++ b/testsuite/bug-regex9.c
@@ -1,5 +1,5 @@
/* Test for memory handling in regex.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/cmd-R.sh b/testsuite/cmd-R.sh
new file mode 100644
index 0000000..55ed685
--- /dev/null
+++ b/testsuite/cmd-R.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Test 'R' command
+
+# Copyright (C) 2016 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
+
+fail=0
+
+printf "%s\n" x y > a || framework_failure_
+printf "%s\n" 1 2 > b || framework_failure_
+printf "%s\n" X > c || framework_failure_
+touch d || framework_failure_
+
+# Read and interleave two lines
+printf "%s\n" x 1 y 2 > exp1 || framework_failure_
+sed -e 1Rb -e 2Rb a > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# Read a non-existing file, silently ignored
+sed -e 1Rq a > out2 || fail=1
+compare_ a out2
+
+# Read two lines from a file, second time will be EOF
+# (implementation note: EOF from get_delim())
+printf "%s\n" x X y > exp3 || framework_failure_
+sed -e 1Rc -e 2Rc a > out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+# Read two lines from an empty file, both will be EOF
+# (implementation note: EOF in before get_delim())
+sed -e 1Rd -e 2Rd a > out4 || fail=1
+compare_ a out4 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/cmd-l.sh b/testsuite/cmd-l.sh
new file mode 100755
index 0000000..743e326
--- /dev/null
+++ b/testsuite/cmd-l.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+# Test 'l' command with different widths
+
+# Copyright (C) 2016 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
+
+fail=0
+
+# 10 20 30 40 50 60 70 75
+cat <<\EOF >in1 || framework_failure_
+0123456789012345678901234567890123456789012345678901234567890123456789012345
+EOF
+
+# default: 70 characters (including the \n)
+cat <<\EOF >exp-def || framework_failure_
+012345678901234567890123456789012345678901234567890123456789012345678\
+9012345$
+EOF
+
+# 11 characters
+cat <<\EOF >exp-11 || framework_failure_
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+0123456789\
+012345$
+EOF
+
+# command 'l n' is a gnu extension, rejected in posix mode
+cat <<\EOF >exp-err-posix-ln || framework_failure_
+sed: -e expression #1, char 2: extra characters after command
+EOF
+
+# sed's default: 70 characters
+sed -n l in1 >out-def || fail=1
+compare_ exp-def out-def || fail=1
+
+# limit with COLS envvar, sed subtracts one to avoid ttys linewraps
+COLS=12 sed -n l in1 >out-cols12 || fail=1
+compare_ exp-11 out-cols12 || fail=1
+
+# invalid COLS envvar should be ignored (wrap at default=70)
+COLS=0 sed -n l in1 >out-cols0 || fail=1
+compare_ exp-def out-cols0 || fail=1
+COLS=foo sed -n l in1 >out-cols-foo || fail=1
+compare_ exp-def out-cols-foo || fail=1
+
+# limit with -l parameter
+sed -l 11 -n l in1 >out-l11 || fail=1
+compare_ exp-11 out-l11 || fail=1
+
+# limit with 'ln' command (gnu extension)
+sed -n l11 in1 >out-ln-11 || fail=1
+compare_ exp-11 out-ln-11 || fail=1
+
+# limit with 'ln' command (gnu extension)
+returns_ 1 sed --posix -n l11 in1 2>err-posix-ln || fail=1
+compare_ exp-err-posix-ln err-posix-ln || fail=1
+
+Exit $fail
diff --git a/testsuite/colon-with-no-label.sh b/testsuite/colon-with-no-label.sh
new file mode 100755
index 0000000..42de378
--- /dev/null
+++ b/testsuite/colon-with-no-label.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Verify that a ":" command with no label is now rejected.
+
+# Copyright (C) 2015-2016 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
+
+echo 'sed: -e expression #1, char 1: ":" lacks a label' > exp-err \
+ || framework_failure_
+
+fail=0
+
+# Before sed-4.3, sed would mistakenly accept a ":" with no following
+# label name.
+echo x | returns_ 1 sed : > out 2> err || fail=1
+
+compare /dev/null out || fail=1
+compare exp-err err || fail=1
+
+Exit $fail
diff --git a/testsuite/comment-n.sh b/testsuite/comment-n.sh
new file mode 100644
index 0000000..240cf86
--- /dev/null
+++ b/testsuite/comment-n.sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+# Test the '#n' silent mode (activated by first line comment)
+
+# Copyright (C) 2016 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
+
+fail=0
+
+echo X > in1 || framework_failure_
+
+# expected output with 'sed -n = in1' (silent mode)
+echo 1 > exp-silent || framework_failure_
+
+# expected output with 'sed = in1' (not silent mode)
+printf "1\nX\n" > exp-norm || framework_failure_
+
+
+# A comment '#n' in the first script, in the first line
+sed -e '#n' in1 > out1 || fail=1
+compare_ /dev/null out1 || fail=1
+
+sed -e '#n' -e = in1 > out2 || fail=1
+compare_ exp-silent out2 || fail=1
+
+sed -e '#ni!' -e = in1 > out3 || fail=1
+compare_ exp-silent out3 || fail=1
+
+# not the first 2 characters, or space before n,
+# or uppercase N - do not activate silent mode
+sed -e '=#n' in1 > out4 || fail=1
+compare_ exp-norm out4 || fail=1
+
+sed -e '# n' -e = in1 > out5 || fail=1
+compare_ exp-norm out5 || fail=1
+
+sed -e '#N' -e = in1 > out6 || fail=1
+compare_ exp-norm out6 || fail=1
+
+sed -e = -e '#n' in1 > out7 || fail=1
+compare_ exp-norm out7 || fail=1
+
+
+#
+# Test the same, with a program instead of -e.
+#
+cat << \EOF > prog1 || framework_failure_
+#n
+=
+EOF
+sed -f prog1 in1 > out8 || fail=1
+compare_ exp-silent out8 || fail=1
+
+# not in the first 2 characters
+cat << \EOF > prog2 || framework_failure_
+=
+#n
+EOF
+sed -f prog2 in1 > out9 || fail=1
+compare_ exp-norm out9 || fail=1
+
+# not in the first 2 characters
+cat << \EOF > prog3 || framework_failure_
+# n
+=
+EOF
+sed -f prog3 in1 > out10 || fail=1
+compare_ exp-norm out10 || fail=1
+
+
+# -e then a program file.
+cat << \EOF > prog4 || framework_failure_
+#n
+EOF
+sed -e = -f prog4 in1 > out11 || fail=1
+compare_ exp-norm out11 || fail=1
+
+
+# If the program comes before -e , silent mode is activated.
+sed -f prog4 -e = in1 > out12 || fail=1
+compare_ exp-silent out12 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/compile-errors.sh b/testsuite/compile-errors.sh
new file mode 100644
index 0000000..9e7414c
--- /dev/null
+++ b/testsuite/compile-errors.sh
@@ -0,0 +1,292 @@
+#!/bin/sh
+# Test compilation errors
+
+# Copyright (C) 2016 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
+
+fail=0
+
+#
+# Excess P modifier to s// (EXCESS_P_OPT)
+#
+cat <<\EOF >exp-exs-p || framework_failure_
+sed: -e expression #1, char 8: multiple `p' options to `s' command
+EOF
+returns_ 1 sed 's/./x/pp' </dev/null 2>err-exs-p || fail=1
+compare_ exp-exs-p err-exs-p || fail=1
+
+#
+# Excess G modifier to s// (EXCESS_G_OPT)
+#
+cat <<\EOF >exp-exs-g || framework_failure_
+sed: -e expression #1, char 8: multiple `g' options to `s' command
+EOF
+returns_ 1 sed 's/./x/gg' </dev/null 2>err-exs-g || fail=1
+compare_ exp-exs-g err-exs-g || fail=1
+
+#
+# zero numeric modifier to s// (ZERO_N_OPT)
+#
+cat <<\EOF >exp-exs-0 || framework_failure_
+sed: -e expression #1, char 7: number option to `s' command may not be zero
+EOF
+returns_ 1 sed 's/./x/0' </dev/null 2>err-exs-0 || fail=1
+compare_ exp-exs-0 err-exs-0 || fail=1
+
+
+#
+# Multiple number modifiers to s// (EXCESS_N_OPT)
+#
+cat <<\EOF >exp-exs-n || framework_failure_
+sed: -e expression #1, char 9: multiple number options to `s' command
+EOF
+returns_ 1 sed 's/./x/2p3' </dev/null 2>err-exs-n || fail=1
+compare_ exp-exs-n err-exs-n || fail=1
+
+
+#
+# Unknown s/// modifier letter
+#
+cat << \EOF >exp-unk-s-opt || framework_failure_
+sed: -e expression #1, char 7: unknown option to `s'
+EOF
+returns_ 1 sed 's/./x/Q' </dev/null 2>err-unk-s-opt || fail=1
+compare_ exp-unk-s-opt err-unk-s-opt || fail=1
+
+#
+# Special case: s/// followed by \r alone
+#
+printf "s/./x/\r" > s-opt-r-in || framework_failure_
+cat << \EOF >exp-s-opt-r || framework_failure_
+sed: file s-opt-r-in line 1: unknown option to `s'
+EOF
+returns_ 1 sed -f s-opt-r-in </dev/null 2>err-s-opt-r || fail=1
+compare_ exp-s-opt-r err-s-opt-r || fail=1
+
+
+#
+# Step-address as first address (BAD_STEP)
+# (both +N and ~N addresses)
+cat <<\EOF >exp-step-addr || framework_failure_
+sed: -e expression #1, char 2: invalid usage of +N or ~N as first address
+EOF
+returns_ 1 sed '~1d' </dev/null 2>err-step-addr1 || fail=1
+compare_ exp-step-addr err-step-addr1 || fail=1
+returns_ 1 sed '+1d' </dev/null 2>err-step-addr2 || fail=1
+compare_ exp-step-addr err-step-addr2 || fail=1
+
+
+#
+# Multiple '!' (BAD_BANG)
+#
+cat <<\EOF >exp-bad-bang || framework_failure_
+sed: -e expression #1, char 3: multiple `!'s
+EOF
+returns_ 1 sed '1!!d' </dev/null 2>err-bad-bang || fail=1
+compare_ exp-bad-bang err-bad-bang || fail=1
+
+
+#
+# GNU extension commands, not accepted in --posix mode
+# (bad_command(OPT))
+for opt in e F v z L Q T R W ;
+do
+ cat <<EOF >exp-posix-cmd-$opt || framework_failure_
+sed: -e expression #1, char 2: unknown command: \`$opt'
+EOF
+ returns_ 1 sed --posix "1$opt" </dev/null 2>err-posix-cmd-$opt || fail=1
+ compare_ exp-posix-cmd-$opt err-posix-cmd-$opt || fail=1
+done
+
+#
+# GNU extension commands, accepting only one address in --posix mode
+# (ONE_ADDR)
+cat <<\EOF >exp-one-addr || framework_failure_
+sed: -e expression #1, char 4: command only uses one address
+EOF
+for opt in a i l = r ;
+do
+ returns_ 1 sed --posix "1,2$opt" </dev/null 2>err-posix-cmd-$opt || fail=1
+ compare_ exp-one-addr err-posix-cmd-$opt || fail=1
+done
+
+# q/Q always accept one address (Q is gnu extension, can't use --posix, above)
+for opt in q Q ;
+do
+ returns_ 1 sed "1,2$opt" </dev/null 2>err-posix-cmd-$opt || fail=1
+ compare_ exp-one-addr err-posix-cmd-$opt || fail=1
+done
+
+#
+# Comment with address (NO_CLOSE_BRACE_ADDR)
+#
+cat <<\EOF >exp-no-sharp || framework_failure_
+sed: -e expression #1, char 2: comments don't accept any addresses
+EOF
+returns_ 1 sed '1#foo' </dev/null 2>err-no-sharp || fail=1
+compare_ exp-no-sharp err-no-sharp || fail=1
+
+
+#
+# Unexpected closing braces (EXCESS_CLOSE_BRACE)
+#
+cat <<\EOF >exp-unexp-brace || framework_failure_
+sed: -e expression #1, char 2: unexpected `}'
+EOF
+returns_ 1 sed '1}' </dev/null 2>err-unexp-brace || fail=1
+compare_ exp-unexp-brace err-unexp-brace || fail=1
+
+
+#
+# Umatched opening braces (EXCESS_OPEN_BRACE)
+# TODO: why 'char 0' ?
+cat <<\EOF >exp-unmatched-braces || framework_failure_
+sed: -e expression #1, char 0: unmatched `{'
+EOF
+returns_ 1 sed '1{' </dev/null 2>err-unmatched-braces || fail=1
+compare_ exp-unmatched-braces err-unmatched-braces || fail=1
+
+
+#
+# '}' with address (NO_CLOSE_BRACE_ADDR)
+#
+cat <<\EOF >exp-brace-addr || framework_failure_
+sed: -e expression #1, char 3: `}' doesn't want any addresses
+EOF
+returns_ 1 sed '{1}' </dev/null 2>err-brace-addr || fail=1
+compare_ exp-brace-addr err-brace-addr || fail=1
+
+
+#
+# Too new version requested (ANCIENT_VERSION)
+# (i.e. this version of SED is too old)
+cat <<\EOF >exp-anc-ver || framework_failure_
+sed: -e expression #1, char 4: expected newer version of sed
+EOF
+returns_ 1 sed 'v9.0' </dev/null 2>err-anc-ver || fail=1
+compare_ exp-anc-ver err-anc-ver || fail=1
+
+
+#
+# Junk after command (EXCESS_JUNK)
+# notes: EOF, \n or ';' are allowed after a command.
+# multiple places abort with EXCESS_JUNK, check them all.
+# dummy addresses ensure the offending char is the same.
+cat <<\EOF >exp-junk || framework_failure_
+sed: -e expression #1, char 7: extra characters after command
+EOF
+returns_ 1 sed '11111=d' </dev/null 2>err-junk || fail=1
+compare_ exp-junk err-junk || fail=1
+returns_ 1 sed 'y/a/b/d' </dev/null 2>err-junk-y || fail=1
+compare_ exp-junk err-junk-y || fail=1
+returns_ 1 sed '1111{}d' </dev/null 2>err-junk-braces || fail=1
+compare_ exp-junk err-junk-braces || fail=1
+returns_ 1 sed '22222ld' </dev/null 2>err-junk-braces || fail=1
+compare_ exp-junk err-junk-braces || fail=1
+
+
+#
+# Slash after a/c/i (EXPECTED_SLASH)
+# note: GNU extensions are less strict than --posix.
+cat <<\EOF >exp-junk || framework_failure_
+sed: -e expression #1, char 2: expected \ after `a', `c' or `i'
+EOF
+for opt in a c i ;
+do
+ # EOF after command
+ returns_ 1 sed "1$opt" </dev/null 2>err-junk-$opt || fail=1
+ compare_ exp-junk err-junk-$opt || fail=1
+
+ # no slash after command, in GNU extension mode - accepted.
+ sed "1${opt}foo" </dev/null >/dev/null || fail=1
+
+ # no slash after command, in --posix mode - rejected.
+ returns_ 1 sed --posix "${opt}foo" </dev/null 2>err-junk-$opt-psx || fail=1
+ compare_ exp-junk err-junk-$opt-psx || fail=1
+done
+
+
+#
+# ':' with address (NO_COLON_ADDR)
+#
+cat <<\EOF >exp-colon-addr || framework_failure_
+sed: -e expression #1, char 2: : doesn't want any addresses
+EOF
+returns_ 1 sed '2:' </dev/null 2>err-colon-addr || fail=1
+compare_ exp-colon-addr err-colon-addr || fail=1
+
+
+
+#
+# q/Q need one address (ONE_ADDR)
+#
+cat <<\EOF >exp-colon-addr || framework_failure_
+sed: -e expression #1, char 2: : doesn't want any addresses
+EOF
+returns_ 1 sed '2:' </dev/null 2>err-colon-addr || fail=1
+compare_ exp-colon-addr err-colon-addr || fail=1
+
+
+#
+# unterminated Y commands (UNTERM_Y_CMD)
+# NOTE: the code calls bad_proc(UNTERM_Y_CMD)
+# in multiple places due to varied conditions - check them all.
+# dummy addresses ensures the offending character is always 5.
+cat <<\EOF >exp-unterm-y || framework_failure_
+sed: -e expression #1, char 5: unterminated `y' command
+EOF
+returns_ 1 sed '1111y' </dev/null 2>err-unterm-y1 || fail=1
+compare_ exp-unterm-y err-unterm-y1 || fail=1
+returns_ 1 sed '111y/' </dev/null 2>err-unterm-y2 || fail=1
+compare_ exp-unterm-y err-unterm-y2 || fail=1
+returns_ 1 sed '11y/a' </dev/null 2>err-unterm-y3 || fail=1
+compare_ exp-unterm-y err-unterm-y3 || fail=1
+returns_ 1 sed '1y/a/' </dev/null 2>err-unterm-y4 || fail=1
+compare_ exp-unterm-y err-unterm-y4 || fail=1
+returns_ 1 sed 'y/a/a' </dev/null 2>err-unterm-y5 || fail=1
+compare_ exp-unterm-y err-unterm-y5 || fail=1
+
+#
+# Y command with bad legth (Y_CMD_LEN)
+# TODO: check with multibyte strings.
+cat <<\EOF >exp-bad-y-len || framework_failure_
+sed: -e expression #1, char 7: strings for `y' command are different lengths
+EOF
+returns_ 1 sed 'y/a/bb/' </dev/null 2>err-bad-y-len || fail=1
+compare_ exp-bad-y-len err-bad-y-len || fail=1
+
+
+#
+# GNU Extension: allow a/c/i to continue in next 'program'.
+# in --posix mode, reject it with "incomplete command" (INCOMPLETE_CMD)
+#
+cat <<\EOF >exp-inc-cmd || framework_failure_
+sed: -e expression #1, char 2: incomplete command
+EOF
+for opt in a c i ;
+do
+ # works as a gnu extension
+ sed -e "$opt\\" -e foo < /dev/null || fail=1
+
+ # rejected in posix mode
+ returns_ 1 sed --posix -e "$opt\\" -e foo </dev/null 2>err-inc-cmd-$opt \
+ || fail=1
+ compare_ exp-inc-cmd err-inc-cmd-$opt || fail=1
+done
+
+
+Exit $fail
diff --git a/testsuite/compile-tests.sh b/testsuite/compile-tests.sh
new file mode 100644
index 0000000..d1117b4
--- /dev/null
+++ b/testsuite/compile-tests.sh
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Test compilation less-common cases
+
+# Copyright (C) 2016 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
+
+fail=0
+
+
+#
+# Special file names, with gnu extensions and without (if the host
+# supports /dev/std{out,err} )
+#
+echo a > a || framework_failure_
+
+# With gnu extension enabled, /dev/stderr is emulated internally
+# regardless of the operating system.
+sed 'w/dev/stderr' a >out 2>err|| fail=1
+compare_ a out || fail=1
+compare_ a err || fail=1
+
+# In posix mode /dev/std* are not emulated internally. Skip if they
+# don't exist. 'env' is used to avoid built-in 'test' which
+# simulates /dev/stderr, e.g. bash on AIX.
+if env test -w /dev/stderr ; then
+ sed --posix 'w/dev/stderr' a >out-psx 2>err-psx || fail=1
+ compare_ a out-psx || fail=1
+ compare_ a err-psx || fail=1
+fi
+
+
+#
+# labels followed by various characters
+# (read_label)
+echo a > lbl-in-exp || framework_failure_
+cat << \EOF > lbl-prog || framework_failure_
+bZ
+:Z
+bY;
+:Y
+{bX}
+:X ;
+b W
+: W
+EOF
+sed -f lbl-prog lbl-in-exp > lbl-out || fail=1
+compare_ lbl-in-exp lbl-out
+
+
+
+#
+# character classes (compile.c:snarf_char_class)
+#
+
+# open brackets followed by EOF
+cat <<\EOF >exp-err-op-bracket || framework_failure_
+sed: -e expression #1, char 2: unterminated address regex
+EOF
+returns_ 1 sed '/[' </dev/null 2>err-op-bracket1 || fail=1
+compare_ exp-err-op-bracket err-op-bracket1 || fail=1
+
+
+# open brackets followed by \n
+printf "/[\n" > op-bracket-prog || framework_failure_
+cat <<\EOF >exp-err-op-bracket || framework_failure_
+sed: file op-bracket-prog line 1: unterminated address regex
+EOF
+returns_ 1 sed -f op-bracket-prog </dev/null 2>err-op-bracket2 || fail=1
+compare_ exp-err-op-bracket err-op-bracket2 || fail=1
+
+
+# unterminated character class '[.'
+# (snarf_char_class terminates on char 7, then returns)
+cat <<\EOF >exp-chr-class || framework_failure_
+sed: -e expression #1, char 7: unterminated `s' command
+EOF
+returns_ 1 sed 's/[[.//' </dev/null 2>err-chr-class || fail=1
+compare_ exp-chr-class err-chr-class || fail=1
+
+
+# closing bracket immediately after char-class opening
+# sequence (e.g. '[:]' instead of '[:alpha:]' ).
+cat<< \EOF >exp-chr-class2 || framework_failure_
+sed: -e expression #1, char 9: unterminated `s' command
+EOF
+returns_ 1 sed 's/[[:]]//' </dev/null 2>err-chr-class2 || fail=1
+compare_ exp-chr-class2 err-chr-class2 || fail=1
+
+
+# EOF after backslash in a regex (compile.c:match_slash())
+cat<< \EOF >exp-backslash-eof || framework_failure_
+sed: -e expression #1, char 2: unterminated address regex
+EOF
+returns_ 1 sed '/\' </dev/null 2>err-backslash-eof || fail=1
+compare_ exp-backslash-eof err-backslash-eof || fail=1
+
+
+# Valid version requirement
+sed 'v4' < /dev/null || fail=1
+
+# Closing braces followed by another closing braces, and '#'
+echo X > in-exp || framework_failure_
+sed -n '{{p}}' in-exp > out-braces-1 || fail=1
+compare_ in-exp out-braces-1 || fail=1
+
+sed -n '{p}#foo' in-exp > out-braces-2 || fail=1
+compare_ in-exp out-braces-2 || fail=1
+
+# 'l' followed by closing braces, and '#'
+printf 'X$\n' > exp-l || framework_failure_
+sed -n '{l}' in-exp > out-l-braces || fail=1
+compare_ exp-l out-l-braces || fail=1
+sed -n 'l#foo' in-exp > out-l-hash || fail=1
+compare_ exp-l out-l-hash || fail=1
+
+
+#
+# unterminated a/c/i as last command
+# (pending_text)
+sed -e 'a\' in-exp > out-unterm-a1 || fail=1
+compare_ in-exp out-unterm-a1 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/convert-number.sh b/testsuite/convert-number.sh
new file mode 100755
index 0000000..e80a23e
--- /dev/null
+++ b/testsuite/convert-number.sh
@@ -0,0 +1,181 @@
+#!/bin/sh
+# Test number conversion from escape sequences \xNN \oNNN \dNNN
+# (compile.c:convert_number())
+
+# Copyright (C) 2016 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
+
+fail=0
+
+
+#
+# Test \dNNN conversions
+#
+printf "%s\n" a a a a a a a > in-d || framework_failure_
+
+# Each line is a separate test case
+cat <<\EOF >prog-d
+# Expected output: ASCII 0x0D '\r'
+1s/./\d13/
+
+# Expected output: ASCII 0xff '\3ff'
+2s/./\d255/
+
+# Expected (?) output: 'dB'
+# (\d followed by character >= base 10, treated as '\d', which is 'd').
+3s/./\dB/
+
+# Expected (?) output: 'dQ'
+# (\d followed by non-hex character, treated as '\d', which is 'd').
+4s/./\dQ/
+
+# Expected output: '{4'
+# \dNNN is limited to three digits.
+# The first three digits are 123 = 0x7b = '{'. '4' is treated as-is.
+5s/./\d1234/
+
+# Expected (?) output: '\1'
+# undocumented implementation-specific limitation:
+# After 3 digit limits, the 8-bit value is used,
+# decimal 513 wraps-around to 1.
+6s/./\d513/
+
+# Expected output: '\0','7'
+# (three digit limit)
+7s/./\d0007/
+EOF
+
+printf '\r\n\377\ndB\ndQ\n{4\n\1\n\0007\n' > exp-d || framework_failure_
+
+sed -f prog-d in-d > out-d || fail=1
+compare_ exp-d out-d || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c prog-d
+ od -tx1c exp-d
+ od -tx1c out-d
+fi
+
+
+
+
+#
+# Test \oNNN conversions
+#
+printf "%s\n" a a a a a a > in-o || framework_failure_
+
+# Each line is a separate test case
+cat <<\EOF >prog-o
+# Expected output: '\5'
+1s/./\o5/
+
+# Expected output: ASCII 0xff '\3ff'
+2s/./\o377/
+
+# Expected (?) output: 'o9'
+# (\o followed by character >= base 18, treated as '\o', which is 'o').
+3s/./\o9/
+
+# Expected (?) output: 'oQ'
+# (\o followed by non-hex character, treated as '\o', which is 'o').
+4s/./\oQ/
+
+# Expected output: 'S4'
+# \oNNN is limited to three digits.
+# The first three digits are o123 = 0x53 = 'S'. '4' is treated as-is.
+5s/./\o1234/
+
+# Expected (?) output: '\1'
+# undocumented implementation-specific limitation:
+# After 3 digit limits, the 8-bit value is used,
+# octal 401 wraps-around to 1.
+6s/./\o401/
+EOF
+
+printf '\5\n\377\no9\noQ\nS4\n\1\n' > exp-o || framework_failure_
+
+sed -f prog-o in-o > out-o || fail=1
+compare_ exp-o out-o || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c prog-o
+ od -tx1c exp-o
+ od -tx1c out-o
+fi
+
+
+
+
+
+#
+# Test \xNN conversions
+#
+printf "%s\n" a a a a > in-x || framework_failure_
+
+# Each line is a separate test case
+cat <<\EOF >prog-x
+# Expected output: ASCII 0x06 '\6'
+1s/./\x6/
+
+# Expected output: ASCII 0xCE '\316'
+2s/./\xce/
+
+# Expected (?) output: 'xy'
+# (\x followed by non-hex character, treated as '\x', which is 'x').
+3s/./\xy/
+
+# Expected output: '\253' 'c' (0xAB = 253 octal)
+# \xNN is limited to two digits.
+4s/./\xabc/
+EOF
+
+printf '\6\n\316\nxy\n\253c\n' > exp-x || framework_failure_
+
+sed -f prog-x in-x > out-x || fail=1
+compare_ exp-x out-x || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c prog-x
+ od -tx1c exp-x
+ od -tx1c out-x
+fi
+
+
+# for completeness, cover all possible letters/digits
+
+printf "%s\n" a a a a a a a a a a a > cnv-num-in || framework_failure_
+cat << \EOF > cnv-num-prog || framework_failure_
+1s/./\x01/
+2s/./\x23/
+3s/./\x45/
+4s/./\x67/
+5s/./\x89/
+6s/./\xAB/
+7s/./\xab/
+8s/./\xCD/
+9s/./\xcd/
+10s/./\xef/
+11s/./\xEF/
+EOF
+
+printf '\1\n#\nE\ng\n\211\n\253\n\253\n\315\n\315\n\357\n\357\n' \
+ > cnv-num-exp || framework_failure_
+
+sed -f cnv-num-prog cnv-num-in > cnv-num-out || fail=1
+compare_ cnv-num-exp cnv-num-out || fail=1
+
+Exit $fail
diff --git a/testsuite/dc.inp b/testsuite/dc.inp
index e4b731b..95e17a4 100644
--- a/testsuite/dc.inp
+++ b/testsuite/dc.inp
@@ -11,4 +11,4 @@ d[30+]s@0>@d[[1+]s@lg11<@]s@25=@d[1+]s@24=@se44le-d[30+]s@21>@dld+7%-7+
# Compute square root of 2
-16oAk2vpq \ No newline at end of file
+16oAk2vpq
diff --git a/testsuite/distrib.sh b/testsuite/distrib.sh
index dbadbdc..21e4c08 100644
--- a/testsuite/distrib.sh
+++ b/testsuite/distrib.sh
@@ -1,7 +1,7 @@
#! /bin/sh
#
# This is stolen from C News
-#
+#
#
diff --git a/testsuite/envvar-check b/testsuite/envvar-check
new file mode 100644
index 0000000..ad672fa
--- /dev/null
+++ b/testsuite/envvar-check
@@ -0,0 +1,64 @@
+# -*- sh -*-
+# Check environment variables for sane values while testing.
+
+# Copyright (C) 2000-2016 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/>.
+
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+envvar_check_fail=0
+vars='
+ _POSIX2_VERSION
+ _STDBUF_E
+ _STDBUF_I
+ _STDBUF_O
+ BASH_ENV
+ BLOCKSIZE
+ BLOCK_SIZE
+ CDPATH
+ COLS
+ COLUMNS
+ DF_BLOCK_SIZE
+ DU_BLOCK_SIZE
+ ENV
+ LANGUAGE
+ LS_BLOCK_SIZE
+ LS_COLORS
+ OMP_NUM_THREADS
+ POSIXLY_CORRECT
+ QUOTING_STYLE
+ SIMPLE_BACKUP_SUFFIX
+ TABSIZE
+ TERM
+ COLORTERM
+ TIME_STYLE
+ TMPDIR
+ VERSION_CONTROL
+'
+for var in $vars
+do
+ $as_unset $var
+ if eval test \"\${$var+set}\" = set; then
+ echo "$0: the $var environment variable is set --" \
+ ' unset it and rerun this test' >&2
+ envvar_check_fail=1
+ fi
+done
+
+test "$envvar_check_fail" = 1 && exit 1
diff --git a/testsuite/eval.good b/testsuite/eval.good
index 6fd021b..4d2a8ff 100644
--- a/testsuite/eval.good
+++ b/testsuite/eval.good
@@ -13,28 +13,28 @@ cpu
17380: 2 2 5 11 79
cpu
---
- abcd
+ abcd
---
- abcd
+ abcd
---
- abcd
+ abcd
---
17380: 2 2 5 11 79
- cpu
+ cpu
---
17380: 2 2 5 11 79
- cpu
+ cpu
---
17380: 2 2 5 11 79
- cpu
+ cpu
---
Doing some more tests -----------------------
17380: 2 2 5 11 79
---
-../sed/sed 1q eval.in2
+./sed/sed 1q eval.in2
---
17380: 2 2 5 11 79
---
-../sed/sed 1q eval.in2
+./sed/sed 1q eval.in2
---
-../sed/sed 1q eval.in2
+./sed/sed 1q eval.in2
diff --git a/testsuite/eval.inp b/testsuite/eval.inp
index 4e30989..6c3df08 100644
--- a/testsuite/eval.inp
+++ b/testsuite/eval.inp
@@ -1,5 +1,5 @@
17380: 2 2 5 11 79
abcd
cpu
- abcd
- cpu
+ abcd
+ cpu
diff --git a/testsuite/eval.sed b/testsuite/eval.sed
index 5734786..1223419 100644
--- a/testsuite/eval.sed
+++ b/testsuite/eval.sed
@@ -2,7 +2,7 @@
#Try eval command
/cpu/!b2
- e../sed/sed 1q eval.in2
+ e./sed/sed 1q eval.in2
:2
p
@@ -10,7 +10,7 @@ i---
h
#Try eval option
- s,.* *cpu *,../sed/sed 1q eval.in2; echo "&",e
+ s,.* *cpu *,./sed/sed 1q eval.in2; echo "&",e
:3
p
@@ -19,7 +19,7 @@ i---
h
#Try eval option with print
- s,.* *cpu.*,../sed/sed 1q eval.in2,ep
+ s,.* *cpu.*,./sed/sed 1q eval.in2,ep
g
@@ -31,11 +31,11 @@ $!d
#Do some more tests
s/.*/Doing some more tests -----------------------/p
-s,.*,../sed/sed 1q eval.in2,ep
+s,.*,./sed/sed 1q eval.in2,ep
i---
-s,.*,../sed/sed 1q eval.in2,pe
+s,.*,./sed/sed 1q eval.in2,pe
i---
-s,.*,../sed/sed 1q eval.in2,
+s,.*,./sed/sed 1q eval.in2,
h
e
p
diff --git a/testsuite/execute-tests.sh b/testsuite/execute-tests.sh
new file mode 100644
index 0000000..2075c6f
--- /dev/null
+++ b/testsuite/execute-tests.sh
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Test execution less-common cases
+
+# Copyright (C) 2016 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
+
+fail=0
+
+
+#
+# 'D' when pattern-space has no newline (act like 'd')
+#
+echo a | sed 1D > out1 || fail=1
+compare_ /dev/null out1 || fail=1
+
+#
+# s///e with a command that returns zero output
+#
+printf "\n" > exp2 || framework_failure_
+echo "" | sed '1etrue' > out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+
+#
+# plain 'e' with a command that returns non-delimted output
+#
+printf "a\n" > exp3 || framework_failure_
+echo "printf a" | sed '1e' > out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+#
+# plain 'e' with a command that returns delimted '\n' output
+# (implementation note: the delimiter is first chomp'd)
+printf "a\n" > exp4 || framework_failure_
+echo "echo a" | sed '1e' > out4 || fail=1
+compare_ exp4 out4 || fail=1
+
+#
+# e with a command that returns delimted '\0' output
+#
+printf "b\0" > exp5 || framework_failure_
+# This input file contains the shell command to be excuted:
+printf 'cat exp5' > in5 || framework_failure_
+sed -z '1e' <in5 > out5 || fail=1
+compare_ exp5 out5 || fail=1
+
+if test "$fail" -eq 1 ; then
+ od -tx1c exp5
+ od -tx1c out5
+fi
+
+#
+# 'P' command, with and without '\n' in the pattern space
+#
+echo a > in6 || framework_failure_
+printf "%s\n" a b | sed -n 'N;P' > out6 || fail=1
+compare_ in6 out6 || fail=1
+
+printf "%s\n" a | sed -n 'P' > out7 || fail=1
+compare_ in6 out7 || fail=1
+
+#
+# 'Q' with exit code
+#
+echo a > in7 || framework_failure_
+returns_ 42 sed '1Q42' in7 || fail=1
+
+#
+# 'r' without a filename (silently ignored)
+#
+echo c > in8 || framework_failure_
+sed 'rfoo.bar' in8 > out8 || fail=1
+compare_ in8 out8 || fail=1
+
+#
+# 'W' without a filename (silently ignored)
+#
+echo d > in9 || framework_failure_
+sed 'Wfoo1' in9 > out9 || fail=1
+compare_ in9 out9 || fail=1
+
+#
+# 'W', with and without '\n' in pattern space
+#
+
+# pattern-space with '\n', only 'a' should be written
+printf "%s\n" a b > in10 || framework_failure_
+echo a > a || framework_failure_
+sed 'N;Ww1.txt' in10 > out10 || fail=1
+compare_ a w1.txt || fail=1
+compare_ in10 out10 || fail=1
+
+# pattern-space without '\n', entire pattern-space ('a') should be written
+sed 'Ww2.txt' a > out11 || fail=1
+compare_ a out11 || fail=1
+compare_ a w2.txt || fail=1
+
+
+#
+# 'T' command
+#
+
+# Unsuccessful substitute, 'T' jumps to 'skip'.
+echo a | sed -n 's/X/Y/ ; Tskip ; Q42 ; :skip' || fail=1
+
+# Successful substitute, 'T' does not jumps to 'skip', sed exits with code 42.
+echo a | returns_ 42 sed -n 's/a/Y/ ; Tskip ; Q42 ; :skip' || fail=1
+
+
+#
+# 'F' command
+#
+echo a > in12 || framework_failure_
+printf "%s\n" in12 a > exp12 || framework_failure_
+sed F in12 > out12 || fail=1
+compare_ exp12 out12 || fail=1
+
+# 'F' with multiple files
+echo b > in13 || framework_failure_
+echo c > in14 || framework_failure_
+printf "%s\n" in12 a in13 b in14 c > exp14 || framework_failure_
+sed F in12 in13 in14 > out14 || fail=1
+compare_ exp14 out14 || fail=1
+
+# 'F' with stdin
+printf "%s\n" - a > exp15 || framework_failure_
+sed F < in12 > out15 || fail=1
+compare_ exp15 out15 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/fasts.sed b/testsuite/fasts.sed
index 5e482f7..fb5161b 100644
--- a/testsuite/fasts.sed
+++ b/testsuite/fasts.sed
@@ -41,6 +41,3 @@ g
s/b$//
p
g
-
-
-
diff --git a/testsuite/flipcase.sed b/testsuite/flipcase.sed
index 211d0d0..7e8edc6 100644
--- a/testsuite/flipcase.sed
+++ b/testsuite/flipcase.sed
@@ -1 +1 @@
-s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g \ No newline at end of file
+s,\([^A-Za-z]*\)\([A-Za-z]*\),\1\L\u\2,g
diff --git a/testsuite/follow-symlinks-stdin.sh b/testsuite/follow-symlinks-stdin.sh
new file mode 100755
index 0000000..fc04fe9
--- /dev/null
+++ b/testsuite/follow-symlinks-stdin.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Verify that --follow-symlinks does not break reading from stdin.
+
+# Copyright (C) 2015-2016 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
+
+echo dbc > exp-out || framework_failure_
+
+fail=0
+echo abc | sed --follow-symlinks s/a/d/ > out 2> err || fail=1
+
+compare exp-out out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/follow-symlinks.sh b/testsuite/follow-symlinks.sh
new file mode 100644
index 0000000..09dde3f
--- /dev/null
+++ b/testsuite/follow-symlinks.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# Test --follow-symlinks option
+
+# Copyright (C) 2016 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
+
+fail=0
+
+#
+# 'F' with/out follow-symlinks
+#
+echo dummy > a || framework_failure_
+ln -s a la1 || framework_failure_
+ln -s la1 la2 || framework_failure_
+
+echo a > exp-a || framework_failure_
+echo la1 > exp-la1 || framework_failure_
+
+# Sanity-check: the real file
+sed 'F;Q' a > out-a || fail=1
+compare_ exp-a out-a || fail=1
+
+# Without follow-symlinks
+sed -n 'F' la1 > out-la1 || fail=1
+compare_ exp-la1 out-la1 || fail=1
+
+# With follow-symlinks
+sed -n --follow-symlinks 'F' la1 > out-la1-flw || fail=1
+compare_ exp-a out-la1-flw || fail=1
+
+# With follow-symlinks and two levels of indirections
+sed -n --follow-symlinks 'F' la2 > out-la2-flw || fail=1
+compare_ exp-a out-la2-flw || fail=1
+
+# Two symlinks input
+# (implementation note: utils.c:follow_symlinks() uses a static buffer
+# which will be non-empty on the second invocation)
+printf "%s\n" a a > exp-two-symlinks || framework_failure_
+sed --follow-symlinks -n 'F' la1 la2 > out-two-symlinks || fail=1
+compare_ exp-two-symlinks out-two-symlinks || fail=1
+
+# non-existing input with --follow-symlink
+# implementation note: lstat() will be called before open(), thus 'cannot stat'.
+cat <<\EOF >exp-stat || framework_failure_
+sed: cannot stat badfile:
+EOF
+returns_ 4 sed --follow-symlinks 'F' badfile >/dev/null 2>err-stat || fail=1
+
+# trim the filename/errno message (using sed itself...)
+sed -i 's/badfile:.*$/badfile:/' err-stat || framework_failure_
+compare_ exp-stat err-stat || fail=1
+
+
+# symlinks with absolute path
+ln -s "$PWD/a" la-abs || framework_failure_
+echo "$PWD/a" > exp-la-abs || framework_failure_
+sed -n --follow-symlinks 'F' la-abs > out-la-abs || fail=1
+compare_ exp-la-abs out-la-abs || fail=1
+
+Exit $fail
diff --git a/testsuite/get-mb-cur-max.c b/testsuite/get-mb-cur-max.c
new file mode 100644
index 0000000..403beb4
--- /dev/null
+++ b/testsuite/get-mb-cur-max.c
@@ -0,0 +1,37 @@
+/* Auxiliary program to detect support for a locale.
+ Copyright 2010-2016 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, 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <config.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "progname.h"
+
+int
+main (int argc, char **argv)
+{
+ set_program_name (argv[0]);
+ if (1 < argc && setlocale (LC_ALL, argv[1]))
+ {
+ printf ("%d\n", (int) MB_CUR_MAX);
+ exit (EXIT_SUCCESS);
+ }
+
+ exit (EXIT_FAILURE);
+}
diff --git a/testsuite/help-version.sh b/testsuite/help-version.sh
new file mode 100755
index 0000000..c93e51e
--- /dev/null
+++ b/testsuite/help-version.sh
@@ -0,0 +1,276 @@
+#! /bin/sh
+# Make sure all of these programs work properly
+# when invoked with --help or --version.
+
+# Copyright (C) 2000-2016 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/>.
+
+# Ensure that $SHELL is set to *some* value and exported.
+# This is required for dircolors, which would fail e.g., when
+# invoked via debuild (which removes SHELL from the environment).
+test "x$SHELL" = x && SHELL=/bin/sh
+export SHELL
+
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+
+expected_failure_status_chroot=125
+expected_failure_status_env=125
+expected_failure_status_nice=125
+expected_failure_status_nohup=125
+expected_failure_status_stdbuf=125
+expected_failure_status_timeout=125
+expected_failure_status_printenv=2
+expected_failure_status_tty=3
+expected_failure_status_sort=2
+expected_failure_status_expr=3
+expected_failure_status_lbracket=2
+expected_failure_status_dir=2
+expected_failure_status_ls=2
+expected_failure_status_vdir=2
+
+expected_failure_status_cmp=2
+expected_failure_status_zcmp=2
+expected_failure_status_sdiff=2
+expected_failure_status_diff3=2
+expected_failure_status_diff=2
+expected_failure_status_zdiff=2
+expected_failure_status_zgrep=2
+expected_failure_status_zegrep=2
+expected_failure_status_zfgrep=2
+
+expected_failure_status_grep=2
+expected_failure_status_egrep=2
+expected_failure_status_fgrep=2
+
+expected_failure_status_sed=4
+
+test "$built_programs" \
+ || fail_ "built_programs not specified!?!"
+
+test "$VERSION" \
+ || fail_ "set envvar VERSION; it is required for a PATH sanity-check"
+
+# Extract version from --version output of the first program
+for i in $built_programs; do
+ v=$(env $i --version | sed -n '1s/.* //p;q')
+ break
+done
+
+# Ensure that it matches $VERSION.
+test "x$v" = "x$VERSION" \
+ || fail_ "--version-\$VERSION mismatch"
+
+for i in $built_programs; do
+
+ # Skip 'test'; it doesn't accept --help or --version.
+ test $i = test && continue
+
+ # false fails even when invoked with --help or --version.
+ # true and false are tested with these options separately.
+ test $i = false || test $i = true && continue
+
+ # The just-built install executable is always named 'ginstall'.
+ test $i = install && i=ginstall
+
+ # Make sure they exit successfully, under normal conditions.
+ env $i --help >/dev/null || fail=1
+ env $i --version >/dev/null || fail=1
+
+ # Make sure they fail upon 'disk full' error.
+ if test -w /dev/full && test -c /dev/full; then
+ env $i --help >/dev/full 2>/dev/null && fail=1
+ env $i --version >/dev/full 2>/dev/null && fail=1
+ status=$?
+ test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
+ eval "expected=\$expected_failure_status_$prog"
+ test x$expected = x && expected=1
+ if test $status = $expected; then
+ : # ok
+ else
+ fail=1
+ echo "*** $i: bad exit status '$status' (expected $expected)," 1>&2
+ echo " with --help or --version output redirected to /dev/full" 1>&2
+ fi
+ fi
+done
+
+bigZ_in=bigZ-in.Z
+zin=zin.gz
+zin2=zin2.gz
+
+tmp=tmp-$$
+tmp_in=in-$$
+tmp_in2=in2-$$
+tmp_dir=dir-$$
+tmp_out=out-$$
+mkdir $tmp || fail=1
+cd $tmp || fail=1
+
+comm_setup () { args="$tmp_in $tmp_in"; }
+csplit_setup () { args="$tmp_in //"; }
+cut_setup () { args='-f 1'; }
+join_setup () { args="$tmp_in $tmp_in"; }
+tr_setup () { args='a a'; }
+
+chmod_setup () { args="a+x $tmp_in"; }
+# Punt on these.
+chgrp_setup () { args=--version; }
+chown_setup () { args=--version; }
+mkfifo_setup () { args=--version; }
+mknod_setup () { args=--version; }
+# Punt on uptime, since it fails (e.g., failing to get boot time)
+# on some systems, and we shouldn't let that stop 'make check'.
+uptime_setup () { args=--version; }
+
+# Create a file in the current directory, not in $TMPDIR.
+mktemp_setup () { args=mktemp.XXXX; }
+
+cmp_setup () { args="$tmp_in $tmp_in2"; }
+
+# Tell dd not to print the line with transfer rate and total.
+# The transfer rate would vary between runs.
+dd_setup () { args=status=noxfer; }
+
+zdiff_setup () { args="$zin $zin2"; }
+zcmp_setup () { args="$zin $zin2"; }
+zcat_setup () { args=$zin; }
+gunzip_setup () { args=$zin; }
+zmore_setup () { args=$zin; }
+zless_setup () { args=$zin; }
+znew_setup () { args=$bigZ_in; }
+zforce_setup () { args=$zin; }
+zgrep_setup () { args="z $zin"; }
+zegrep_setup () { args="z $zin"; }
+zfgrep_setup () { args="z $zin"; }
+gzexe_setup () { args=$tmp_in; }
+
+# We know that $tmp_in contains a "0"
+grep_setup () { args="0 $tmp_in"; }
+egrep_setup () { args="0 $tmp_in"; }
+fgrep_setup () { args="0 $tmp_in"; }
+
+sed_setup () { args="s/a/b/ $tmp_in"; }
+
+diff_setup () { args="$tmp_in $tmp_in2"; }
+sdiff_setup () { args="$tmp_in $tmp_in2"; }
+diff3_setup () { args="$tmp_in $tmp_in2 $tmp_in2"; }
+cp_setup () { args="$tmp_in $tmp_in2"; }
+ln_setup () { args="$tmp_in ln-target"; }
+ginstall_setup () { args="$tmp_in $tmp_in2"; }
+mv_setup () { args="$tmp_in $tmp_in2"; }
+mkdir_setup () { args=$tmp_dir/subdir; }
+realpath_setup () { args=$tmp_in; }
+rmdir_setup () { args=$tmp_dir; }
+rm_setup () { args=$tmp_in; }
+shred_setup () { args=$tmp_in; }
+touch_setup () { args=$tmp_in2; }
+truncate_setup () { args="--reference=$tmp_in $tmp_in2"; }
+
+mkid_setup () { printf 'f(){}\ntypedef int t;\n' > f.c; args=. ; }
+lid_setup () { args=; }
+fid_setup () { args=f.c; }
+fnid_setup () { args=; }
+xtokid_setup () { args=; }
+aid_setup () { args=f; }
+eid_setup () { args=--version; }
+gid_setup () { args=f; }
+defid_setup () { args=t; }
+
+basename_setup () { args=$tmp_in; }
+dirname_setup () { args=$tmp_in; }
+expr_setup () { args=foo; }
+
+# Punt, in case GNU 'id' hasn't been installed yet.
+groups_setup () { args=--version; }
+
+pathchk_setup () { args=$tmp_in; }
+yes_setup () { args=--version; }
+logname_setup () { args=--version; }
+nohup_setup () { args=--version; }
+printf_setup () { args=foo; }
+seq_setup () { args=10; }
+sleep_setup () { args=0; }
+stdbuf_setup () { args="-oL true"; }
+timeout_setup () { args=--version; }
+
+# I'd rather not run sync, since it spins up disks that I've
+# deliberately caused to spin down (but not unmounted).
+sync_setup () { args=--version; }
+
+test_setup () { args=foo; }
+
+# This is necessary in the unusual event that there is
+# no valid entry in /etc/mtab.
+df_setup () { args=/; }
+
+# This is necessary in the unusual event that getpwuid (getuid ()) fails.
+id_setup () { args=-u; }
+
+# Use env to avoid invoking built-in sleep of Solaris 11's /bin/sh.
+kill_setup () {
+ env sleep 31.5 &
+ args=$!
+}
+
+link_setup () { args="$tmp_in link-target"; }
+unlink_setup () { args=$tmp_in; }
+
+readlink_setup () {
+ ln -s . slink
+ args=slink;
+}
+
+stat_setup () { args=$tmp_in; }
+unlink_setup () { args=$tmp_in; }
+lbracket_setup () { args=": ]"; }
+
+parted_setup () { args="-s $tmp_in mklabel gpt"
+ dd if=/dev/null of=$tmp_in seek=2000; }
+
+# Ensure that each program "works" (exits successfully) when doing
+# something more than --help or --version.
+for i in $built_programs; do
+ # Skip these.
+ case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac
+
+ rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2
+ echo z |gzip > $zin
+ cp $zin $zin2
+ cp $zin $bigZ_in
+
+ # This is sort of kludgey: use numbers so this is valid input for factor,
+ # and two tokens so it's valid input for tsort.
+ echo 2147483647 0 > $tmp_in
+ # Make $tmp_in2 identical. Then, using $tmp_in and $tmp_in2 as arguments
+ # to the likes of cmp and diff makes them exit successfully.
+ cp $tmp_in $tmp_in2
+ mkdir $tmp_dir
+ # echo ================== $i
+ test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
+ if type ${prog}_setup > /dev/null 2>&1; then
+ ${prog}_setup
+ else
+ args=
+ fi
+ if env $i $args < $tmp_in > $tmp_out; then
+ : # ok
+ else
+ echo FAIL: $i
+ fail=1
+ fi
+ rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir
+done
+
+Exit $fail
diff --git a/testsuite/in-place-hyphen.sh b/testsuite/in-place-hyphen.sh
new file mode 100755
index 0000000..8b6752e
--- /dev/null
+++ b/testsuite/in-place-hyphen.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Verify that "-" is treated as a file name with --in-place.
+
+# Copyright (C) 2015-2016 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
+
+echo abc > ./- || framework_failure_
+echo aXc > exp-out || framework_failure_
+
+fail=0
+sed -i 's/b/X/' - > out 2> err || fail=1
+
+compare exp-out ./- || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/in-place-suffix-backup.sh b/testsuite/in-place-suffix-backup.sh
new file mode 100644
index 0000000..6eaea82
--- /dev/null
+++ b/testsuite/in-place-suffix-backup.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Test -i/--inplace with backup suffixes
+
+# Copyright (C) 2016 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
+
+
+# create multiple uniquely-named input files
+# (the content does not matter for the first few)
+touch a b c d e || framework_failure_
+echo z > z || framework_failure_
+printf "1\nz\n" >> exp-z || framework_failure_
+
+
+# TODO: misleading error: the problem is the target filename of rename(2),
+# not the source filename.
+cat <<\EOF >exp-err-rename || framework_failure_
+sed: cannot rename ./e: No such file or directory
+EOF
+
+
+# simple backup suffix
+sed -i.bak = a || fail=1
+test -e a.bak || fail=1
+
+# backup suffix with explicit wildcard
+sed -i'*.foo' = b || fail=1
+test -e b.foo || fail=1
+
+sed -i'==*==' = c || fail=1
+test -e ==c== || fail=1
+
+# abuse the suffix-name resolver
+sed -i'*=*' = d || fail=1
+test -e d=d || fail=1
+
+# This fails (as expected, with the backup name resolving './e./e./e').
+# TODO: improve error message;
+# document why exit code is 4.
+returns_ 4 sed -i'***' = ./e 2>err-rename || fail=1
+compare_ exp-err-rename err-rename || fail=1
+
+# backup filename resolving to the same as the input filename,
+# silently ignored, backup not created (in execute.c:closedown() ).
+sed -i'*' = z || fail=1
+# ensure the input file was modified in-place
+compare_ exp-z z || fail=1
+
+
+Exit $fail
diff --git a/testsuite/inclib.good b/testsuite/inclib.good
index 6b1279a..cb04b39 100644
--- a/testsuite/inclib.good
+++ b/testsuite/inclib.good
@@ -1,34 +1,34 @@
- /usr/X11R6/include
- /usr/X11R5/include
- /usr/X11R4/include
-
- /usr/include/X11R6
- /usr/include/X11R5
- /usr/include/X11R4
-
- /usr/local/X11R6/include
- /usr/local/X11R5/include
- /usr/local/X11R4/include
-
- /usr/local/include/X11R6
- /usr/local/include/X11R5
- /usr/local/include/X11R4
-
- /usr/X11/include
- /usr/include/X11
- /usr/local/X11/include
- /usr/local/include/X11
-
- /usr/X386/include
- /usr/x386/include
- /usr/XFree86/include/X11
-
- /usr/include
- /usr/local/include
- /usr/unsupported/include
- /usr/athena/include
- /usr/local/x11r5/include
- /usr/lpp/Xamples/include
-
- /usr/openwin/include
- /usr/openwin/share/include
+ /usr/X11R6/include
+ /usr/X11R5/include
+ /usr/X11R4/include
+
+ /usr/include/X11R6
+ /usr/include/X11R5
+ /usr/include/X11R4
+
+ /usr/local/X11R6/include
+ /usr/local/X11R5/include
+ /usr/local/X11R4/include
+
+ /usr/local/include/X11R6
+ /usr/local/include/X11R5
+ /usr/local/include/X11R4
+
+ /usr/X11/include
+ /usr/include/X11
+ /usr/local/X11/include
+ /usr/local/include/X11
+
+ /usr/X386/include
+ /usr/x386/include
+ /usr/XFree86/include/X11
+
+ /usr/include
+ /usr/local/include
+ /usr/unsupported/include
+ /usr/athena/include
+ /usr/local/x11r5/include
+ /usr/lpp/Xamples/include
+
+ /usr/openwin/include
+ /usr/openwin/share/include
diff --git a/testsuite/inclib.inp b/testsuite/inclib.inp
index 552e9e2..1f71277 100644
--- a/testsuite/inclib.inp
+++ b/testsuite/inclib.inp
@@ -1,34 +1,34 @@
- /usr/X11R6/lib
- /usr/X11R5/lib
- /usr/X11R4/lib
-
- /usr/lib/X11R6
- /usr/lib/X11R5
- /usr/lib/X11R4
-
- /usr/local/X11R6/lib
- /usr/local/X11R5/lib
- /usr/local/X11R4/lib
-
- /usr/local/lib/X11R6
- /usr/local/lib/X11R5
- /usr/local/lib/X11R4
-
- /usr/X11/lib
- /usr/lib/X11
- /usr/local/X11/lib
- /usr/local/lib/X11
-
- /usr/X386/lib
- /usr/x386/lib
- /usr/XFree86/lib/X11
-
- /usr/lib
- /usr/local/lib
- /usr/unsupported/lib
- /usr/athena/lib
- /usr/local/x11r5/lib
- /usr/lpp/Xamples/lib
-
- /usr/openwin/lib
- /usr/openwin/share/lib
+ /usr/X11R6/lib
+ /usr/X11R5/lib
+ /usr/X11R4/lib
+
+ /usr/lib/X11R6
+ /usr/lib/X11R5
+ /usr/lib/X11R4
+
+ /usr/local/X11R6/lib
+ /usr/local/X11R5/lib
+ /usr/local/X11R4/lib
+
+ /usr/local/lib/X11R6
+ /usr/local/lib/X11R5
+ /usr/local/lib/X11R4
+
+ /usr/X11/lib
+ /usr/lib/X11
+ /usr/local/X11/lib
+ /usr/local/lib/X11
+
+ /usr/X386/lib
+ /usr/x386/lib
+ /usr/XFree86/lib/X11
+
+ /usr/lib
+ /usr/local/lib
+ /usr/unsupported/lib
+ /usr/athena/lib
+ /usr/local/x11r5/lib
+ /usr/lpp/Xamples/lib
+
+ /usr/openwin/lib
+ /usr/openwin/share/lib
diff --git a/testsuite/init.sh b/testsuite/init.sh
new file mode 100644
index 0000000..ee08022
--- /dev/null
+++ b/testsuite/init.sh
@@ -0,0 +1,613 @@
+# source this file; set up for tests
+
+# Copyright (C) 2009-2016 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/>.
+
+# Using this file in a test
+# =========================
+#
+# The typical skeleton of a test looks like this:
+#
+# #!/bin/sh
+# . "${srcdir=.}/init.sh"; path_prepend_ .
+# Execute some commands.
+# Note that these commands are executed in a subdirectory, therefore you
+# need to prepend "../" to relative filenames in the build directory.
+# Note that the "path_prepend_ ." is useful only if the body of your
+# test invokes programs residing in the initial directory.
+# For example, if the programs you want to test are in src/, and this test
+# script is named tests/test-1, then you would use "path_prepend_ ../src",
+# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
+# to all tests via automake's TESTS_ENVIRONMENT.
+# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
+# Use the skip_ and fail_ functions to print a diagnostic and then exit
+# with the corresponding exit code.
+# Exit $?
+
+# Executing a test that uses this file
+# ====================================
+#
+# Running a single test:
+# $ make check TESTS=test-foo.sh
+#
+# Running a single test, with verbose output:
+# $ make check TESTS=test-foo.sh VERBOSE=yes
+#
+# Running a single test, with single-stepping:
+# 1. Go into a sub-shell:
+# $ bash
+# 2. Set relevant environment variables from TESTS_ENVIRONMENT in the
+# Makefile:
+# $ export srcdir=../../tests # this is an example
+# 3. Execute the commands from the test, copy&pasting them one by one:
+# $ . "$srcdir/init.sh"; path_prepend_ .
+# ...
+# 4. Finally
+# $ exit
+
+ME_=`expr "./$0" : '.*/\(.*\)$'`
+
+# We use a trap below for cleanup. This requires us to go through
+# hoops to get the right exit status transported through the handler.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit () { set +e; (exit $1); exit $1; }
+
+# Print warnings (e.g., about skipped and failed tests) to this file number.
+# Override by defining to say, 9, in init.cfg, and putting say,
+# export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+# This is useful when using automake's parallel tests mode, to print
+# the reason for skip/failure to console, rather than to the .log files.
+: ${stderr_fileno_=2}
+
+# Note that correct expansion of "$*" depends on IFS starting with ' '.
+# Always write the full diagnostic to stderr.
+# When stderr_fileno_ is not 2, also emit the first line of the
+# diagnostic to that file descriptor.
+warn_ ()
+{
+ # If IFS does not start with ' ', set it and emit the warning in a subshell.
+ case $IFS in
+ ' '*) printf '%s\n' "$*" >&2
+ test $stderr_fileno_ = 2 \
+ || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;;
+ *) (IFS=' '; warn_ "$@");;
+ esac
+}
+fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
+skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
+framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
+
+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example. With this helper you
+# instead check an explicit exit code like
+# returns_ 1 command ... || fail
+returns_ () {
+ # Disable tracing so it doesn't interfere with stderr of the wrapped command
+ { set +x; } 2>/dev/null
+
+ local exp_exit="$1"
+ shift
+ "$@"
+ test $? -eq $exp_exit && ret_=0 || ret_=1
+
+ if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+ set -x
+ fi
+ { return $ret_; } 2>/dev/null
+}
+
+# Sanitize this shell to POSIX mode, if possible.
+DUALCASE=1; export DUALCASE
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+ esac
+fi
+
+# We require $(...) support unconditionally.
+# We require a few additional shell features only when $EXEEXT is nonempty,
+# in order to support automatic $EXEEXT emulation:
+# - hyphen-containing alias names
+# - we prefer to use ${var#...} substitution, rather than having
+# to work around lack of support for that feature.
+# The following code attempts to find a shell with support for these features.
+# If the current shell passes the test, we're done. Otherwise, test other
+# shells until we find one that passes. If one is found, re-exec it.
+# If no acceptable shell is found, skip the current test.
+#
+# The "...set -x; P=1 true 2>err..." test is to disqualify any shell that
+# emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do.
+#
+# Use "9" to indicate success (rather than 0), in case some shell acts
+# like Solaris 10's /bin/sh but exits successfully instead of with status 2.
+
+# Eval this code in a subshell to determine a shell's suitability.
+# 10 - passes all tests; ok to use
+# 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score
+# ? - not ok
+gl_shell_test_script_='
+test $(echo y) = y || exit 1
+f_local_() { local v=1; }; f_local_ || exit 1
+score_=10
+if test "$VERBOSE" = yes; then
+ test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
+fi
+test -z "$EXEEXT" && exit $score_
+shopt -s expand_aliases
+alias a-b="echo zoo"
+v=abx
+ test ${v%x} = ab \
+ && test ${v#a} = bx \
+ && test $(a-b) = zoo \
+ && exit $score_
+'
+
+if test "x$1" = "x--no-reexec"; then
+ shift
+else
+ # Assume a working shell. Export to subshells (setup_ needs this).
+ gl_set_x_corrupts_stderr_=false
+ export gl_set_x_corrupts_stderr_
+
+ # Record the first marginally acceptable shell.
+ marginal_=
+
+ # Search for a shell that meets our requirements.
+ for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \
+ /bin/sh bash dash zsh pdksh fail
+ do
+ test "$re_shell_" = no_shell && continue
+
+ # If we've made it all the way to the sentinel, "fail" without
+ # finding even a marginal shell, skip this test.
+ if test "$re_shell_" = fail; then
+ test -z "$marginal_" && skip_ failed to find an adequate shell
+ re_shell_=$marginal_
+ break
+ fi
+
+ # When testing the current shell, simply "eval" the test code.
+ # Otherwise, run it via $re_shell_ -c ...
+ if test "$re_shell_" = __current__; then
+ # 'eval'ing this code makes Solaris 10's /bin/sh exit with
+ # $? set to 2. It does not evaluate any of the code after the
+ # "unexpected" first '('. Thus, we must run it in a subshell.
+ ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
+ else
+ "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
+ fi
+
+ st_=$?
+
+ # $re_shell_ works just fine. Use it.
+ if test $st_ = 10; then
+ gl_set_x_corrupts_stderr_=false
+ break
+ fi
+
+ # If this is our first marginally acceptable shell, remember it.
+ if test "$st_:$marginal_" = 9: ; then
+ marginal_="$re_shell_"
+ gl_set_x_corrupts_stderr_=true
+ fi
+ done
+
+ if test "$re_shell_" != __current__; then
+ # Found a usable shell. Preserve -v and -x.
+ case $- in
+ *v*x* | *x*v*) opts_=-vx ;;
+ *v*) opts_=-v ;;
+ *x*) opts_=-x ;;
+ *) opts_= ;;
+ esac
+ re_shell=$re_shell_
+ export re_shell
+ exec "$re_shell_" $opts_ "$0" --no-reexec "$@"
+ echo "$ME_: exec failed" 1>&2
+ exit 127
+ fi
+fi
+
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above. Why use aliases rather
+# than functions? Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
+test -n "$EXEEXT" && shopt -s expand_aliases
+
+# Enable glibc's malloc-perturbing option.
+# This is useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
+
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt). Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_ () { :; }
+
+# Emit a header similar to that from diff -u; Print the simulated "diff"
+# command so that the order of arguments is clear. Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+ printf '%s\n' "diff -u $*" \
+ "--- $1 1970-01-01" \
+ "+++ $2 1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+ test $# = 2 || return 2
+
+ if test "x$1" = x/dev/null; then
+ test -s "$2" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+ return 1
+ fi
+
+ if test "x$2" = x/dev/null; then
+ test -s "$1" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+ return 1
+ fi
+
+ 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
+ if test -z "$diff_out_"; then
+ compare_ () { diff -c "$@"; }
+ 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
+ }
+ fi
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
+ compare_ () { cmp -s "$@"; }
+else
+ compare_ () { cmp "$@"; }
+fi
+
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+ # This looks like it can be factored to use a simple "case $?"
+ # after unchecked compare_dev_null_ invocation, but that would
+ # fail in a "set -e" environment.
+ if compare_dev_null_ "$@"; then
+ return 0
+ else
+ case $? in
+ 1) return 1;;
+ *) compare_ "$@";;
+ esac
+ fi
+}
+
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_ () { printf gt; }
+
+# Run the user-overridable cleanup_ function, remove the temporary
+# directory and exit with the incoming value of $?.
+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; }
+ exit $__st
+}
+
+# Given a directory name, DIR, if every entry in it that matches *.exe
+# contains only the specified bytes (see the case stmt below), then print
+# a space-separated list of those names and return 0. Otherwise, don't
+# print anything and return 1. Naming constraints apply also to DIR.
+find_exe_basenames_ ()
+{
+ feb_dir_=$1
+ feb_fail_=0
+ feb_result_=
+ feb_sp_=
+ for feb_file_ in $feb_dir_/*.exe; do
+ # If there was no *.exe file, or there existed a file named "*.exe" that
+ # was deleted between the above glob expansion and the existence test
+ # below, just skip it.
+ test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \
+ && continue
+ # Exempt [.exe, since we can't create a function by that name, yet
+ # we can't invoke [ by PATH search anyways due to shell builtins.
+ test "x$feb_file_" = "x$feb_dir_/[.exe" && continue
+ case $feb_file_ in
+ *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
+ *) # Remove leading file name components as well as the .exe suffix.
+ feb_file_=${feb_file_##*/}
+ feb_file_=${feb_file_%.exe}
+ feb_result_="$feb_result_$feb_sp_$feb_file_";;
+ esac
+ feb_sp_=' '
+ done
+ test $feb_fail_ = 0 && printf %s "$feb_result_"
+ return $feb_fail_
+}
+
+# Consider the files in directory, $1.
+# For each file name of the form PROG.exe, create an alias named
+# PROG that simply invokes PROG.exe, then return 0. If any selected
+# file name or the directory name, $1, contains an unexpected character,
+# define no alias and return 1.
+create_exe_shims_ ()
+{
+ case $EXEEXT in
+ '') return 0 ;;
+ .exe) ;;
+ *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;;
+ esac
+
+ base_names_=`find_exe_basenames_ $1` \
+ || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; }
+
+ if test -n "$base_names_"; then
+ for base_ in $base_names_; do
+ alias "$base_"="$base_$EXEEXT"
+ done
+ fi
+
+ return 0
+}
+
+# Use this function to prepend to PATH an absolute name for each
+# specified, possibly-$initial_cwd_-relative, directory.
+path_prepend_ ()
+{
+ while test $# != 0; do
+ path_dir_=$1
+ case $path_dir_ in
+ '') fail_ "invalid path dir: '$1'";;
+ /*) abs_path_dir_=$path_dir_;;
+ *) abs_path_dir_=$initial_cwd_/$path_dir_;;
+ esac
+ case $abs_path_dir_ in
+ *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+ esac
+ PATH="$abs_path_dir_:$PATH"
+
+ # Create an alias, FOO, for each FOO.exe in this directory.
+ create_exe_shims_ "$abs_path_dir_" \
+ || fail_ "something failed (above): $abs_path_dir_"
+ shift
+ done
+ export PATH
+}
+
+setup_ ()
+{
+ if test "$VERBOSE" = yes; then
+ # Test whether set -x may cause the selected shell to corrupt an
+ # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh
+ # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
+ # If enabling verbose output this way would cause trouble, simply
+ # issue a warning and refrain.
+ if $gl_set_x_corrupts_stderr_; then
+ warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
+ else
+ set -x
+ fi
+ fi
+
+ initial_cwd_=$PWD
+ fail=0
+
+ pfx_=`testdir_prefix_`
+ test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+ || fail_ "failed to create temporary directory in $initial_cwd_"
+ cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+
+ # As autoconf-generated configure scripts do, ensure that IFS
+ # is defined initially, so that saving and restoring $IFS works.
+ gl_init_sh_nl_='
+'
+ IFS=" "" $gl_init_sh_nl_"
+
+ # This trap statement, along with a trap on 0 below, ensure that the
+ # temporary directory, $test_dir_, is removed upon exit as well as
+ # upon receipt of any of the listed signals.
+ for sig_ in 1 2 3 13 15; do
+ eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
+ done
+}
+
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+# - try to get random bytes from /dev/urandom
+# - failing that, generate output from a combination of quickly-varying
+# sources and gzip. Ignore non-varying gzip header, and extract
+# "random" bits from there.
+# - given those bits, map to file-name bytes using tr, and try to create
+# the desired directory.
+# - make only $MAX_TRIES_ attempts
+
+# Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_ ()
+{
+ n_=$1
+
+ # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+ # But if they have openssl, they probably have mktemp, too.
+
+ chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+ dev_rand_=/dev/urandom
+ if test -r "$dev_rand_"; then
+ # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+ dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+ return
+ fi
+
+ n_plus_50_=`expr $n_ + 50`
+ cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+ data_=` (eval "$cmds_") 2>&1 | gzip `
+
+ # Ensure that $data_ has length at least 50+$n_
+ while :; do
+ len_=`echo "$data_"|wc -c`
+ test $n_plus_50_ -le $len_ && break;
+ data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+ done
+
+ echo "$data_" \
+ | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+ | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+}
+
+mktempd_ ()
+{
+ case $# in
+ 2);;
+ *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
+ esac
+
+ destdir_=$1
+ template_=$2
+
+ MAX_TRIES_=4
+
+ # Disallow any trailing slash on specified destdir:
+ # it would subvert the post-mktemp "case"-based destdir test.
+ case $destdir_ in
+ /) ;;
+ */) fail_ "invalid destination dir: remove trailing slash(es)";;
+ esac
+
+ case $template_ in
+ *XXXX) ;;
+ *) fail_ \
+ "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+ esac
+
+ # First, try to use mktemp.
+ d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
+ || fail=1
+
+ # The resulting name must be in the specified directory.
+ case $d in "$destdir_"*);; *) fail=1;; esac
+
+ # It must have created the directory.
+ test -d "$d" || fail=1
+
+ # 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 && {
+ echo "$d"
+ return
+ }
+
+ # If we reach this point, we'll have to create a directory manually.
+
+ # Get a copy of the template without its suffix of X's.
+ base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+ # Calculate how many X's we've just removed.
+ template_length_=`echo "$template_" | wc -c`
+ nx_=`echo "$base_template_" | wc -c`
+ nx_=`expr $template_length_ - $nx_`
+
+ err_=
+ i_=1
+ while :; do
+ X_=`rand_bytes_ $nx_`
+ candidate_dir_="$destdir_/$base_template_$X_"
+ err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+ && { echo "$candidate_dir_"; return; }
+ test $MAX_TRIES_ -le $i_ && break;
+ i_=`expr $i_ + 1`
+ done
+ fail_ "$err_"
+}
+
+# If you want to override the testdir_prefix_ function,
+# or to add more utility functions, use this file.
+test -f "$srcdir/init.cfg" \
+ && . "$srcdir/init.cfg"
+
+setup_ "$@"
+# This trap is here, rather than in the setup_ function, because some
+# shells run the exit trap at shell function exit, rather than script exit.
+trap remove_tmp_ 0
diff --git a/testsuite/invalid-mb-seq-UMR.sh b/testsuite/invalid-mb-seq-UMR.sh
new file mode 100755
index 0000000..d87bd4c
--- /dev/null
+++ b/testsuite/invalid-mb-seq-UMR.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Inserting an invalid multibyte sequence could lead to
+# reading uninitialized memory.
+
+# Copyright (C) 2015-2016 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_
+
+test "$LOCALE_JA" = none && skip_ found no Japanese EUC locale
+
+# Ensure the implementation is not buggy (skip otherwise)
+require_valid_ja_eucjp_locale_ "$LOCALE_JA"
+
+echo a > in || framework_failure_
+printf 'b\262C\n' > exp || framework_failure_
+LC_ALL=$LOCALE_JA valgrind --quiet --error-exitcode=1 \
+ sed 's/a/b\U\xb2c/' 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/khadafy.good b/testsuite/khadafy.good
index e719f4e..57e21a1 100644
--- a/testsuite/khadafy.good
+++ b/testsuite/khadafy.good
@@ -26,7 +26,7 @@
26) Muammar Quathafi
27) Muammar Gheddafi
28) Muamar Al-Kaddafi
-29) Moammar Khadafy
+29) Moammar Khadafy
30) Moammar Qudhafi
31) Mu'ammar al-Qaddafi
32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi
diff --git a/testsuite/khadafy.inp b/testsuite/khadafy.inp
index e719f4e..57e21a1 100644
--- a/testsuite/khadafy.inp
+++ b/testsuite/khadafy.inp
@@ -26,7 +26,7 @@
26) Muammar Quathafi
27) Muammar Gheddafi
28) Muamar Al-Kaddafi
-29) Moammar Khadafy
+29) Moammar Khadafy
30) Moammar Qudhafi
31) Mu'ammar al-Qaddafi
32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi
diff --git a/testsuite/linecnt.good b/testsuite/linecnt.good
index 3cc1bd6..0488b62 100644
--- a/testsuite/linecnt.good
+++ b/testsuite/linecnt.good
@@ -33,7 +33,7 @@ A dialogue on poverty
17
But cold and bitter is the night!
18
- As for those poorer than myself,
+ As for those poorer than myself,
19
Their parents must be cold and hungry,
20
@@ -41,7 +41,7 @@ A dialogue on poverty
21
Then, how do you struggle through life?
22
-
+
23
Wide as they call the heaven and earth,
24
diff --git a/testsuite/linecnt.inp b/testsuite/linecnt.inp
index 9eb6070..a34df29 100644
--- a/testsuite/linecnt.inp
+++ b/testsuite/linecnt.inp
@@ -15,11 +15,11 @@ A dialogue on poverty
I pull up my hempen bedclothes,
Wear what few sleeveless clothes I have,
But cold and bitter is the night!
- As for those poorer than myself,
+ As for those poorer than myself,
Their parents must be cold and hungry,
Their wives and children beg and cry.
Then, how do you struggle through life?
-
+
Wide as they call the heaven and earth,
For me they have shrunk quite small;
Bright though they call the sun and moon,
diff --git a/testsuite/local.mk b/testsuite/local.mk
new file mode 100644
index 0000000..ae1f06c
--- /dev/null
+++ b/testsuite/local.mk
@@ -0,0 +1,370 @@
+# Copyright (C) 2016 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/>.
+
+CLEANFILES += tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
+
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+
+# Put new, init.sh-using tests here, so that each name
+# is listed in only one place.
+
+T = \
+ testsuite/cmd-l.sh \
+ testsuite/cmd-R.sh \
+ testsuite/colon-with-no-label.sh \
+ testsuite/comment-n.sh \
+ testsuite/compile-errors.sh \
+ testsuite/compile-tests.sh \
+ testsuite/convert-number.sh \
+ testsuite/execute-tests.sh \
+ testsuite/help-version.sh \
+ testsuite/in-place-hyphen.sh \
+ testsuite/in-place-suffix-backup.sh \
+ testsuite/invalid-mb-seq-UMR.sh \
+ testsuite/mb-bad-delim.sh \
+ testsuite/mb-charclass-non-utf8.sh \
+ testsuite/mb-match-slash.sh \
+ testsuite/mb-y-translate.sh \
+ testsuite/normalize-text.sh \
+ testsuite/nulldata.sh \
+ testsuite/panic-tests.sh \
+ testsuite/posix-char-class.sh \
+ testsuite/posix-mode-addr.sh \
+ testsuite/posix-mode-bad-ref.sh \
+ testsuite/posix-mode-s.sh \
+ testsuite/posix-mode-N.sh \
+ testsuite/range-overlap.sh \
+ testsuite/recursive-escape-c.sh \
+ testsuite/regex-errors.sh \
+ testsuite/sandbox.sh \
+ testsuite/stdin-prog.sh \
+ testsuite/subst-options.sh \
+ testsuite/subst-mb-incomplete.sh \
+ testsuite/subst-replacement.sh \
+ testsuite/temp-file-cleanup.sh \
+ testsuite/title-case.sh \
+ testsuite/unbuffered.sh
+
+if TEST_SYMLINKS
+T += testsuite/follow-symlinks.sh \
+ testsuite/follow-symlinks-stdin.sh
+endif
+
+
+
+TESTS = $(check_PROGRAMS) $(SEDTESTS) $(T)
+
+SEDTESTS =
+
+noinst_HEADERS += testsuite/testcases.h testsuite/ptestcases.h
+
+check_PROGRAMS = testsuite/get-mb-cur-max testsuite/test-mbrtowc
+testsuite_get_mb_cur_max_LDADD = lib/libsed.a $(INTLLIBS)
+testsuite_test_mbrtowc_LDADD = lib/libsed.a $(INTLLIBS)
+
+if TEST_REGEX
+check_PROGRAMS += testsuite/bug-regex7 \
+ testsuite/bug-regex8 testsuite/bug-regex9 testsuite/bug-regex10 \
+ testsuite/bug-regex11 testsuite/bug-regex12 testsuite/bug-regex13 \
+ testsuite/bug-regex14 testsuite/bug-regex15 testsuite/bug-regex16 \
+ testsuite/bug-regex21 testsuite/bug-regex27 testsuite/bug-regex28 \
+ testsuite/tst-pcre testsuite/tst-boost testsuite/runtests \
+ testsuite/runptests testsuite/tst-rxspencer testsuite/tst-regex2
+
+SEDTESTS += space
+endif
+
+SEDTESTS += testsuite/appquit testsuite/enable testsuite/sep \
+ testsuite/inclib testsuite/8bit testsuite/newjis \
+ testsuite/xabcx testsuite/dollar testsuite/noeol \
+ testsuite/noeolw testsuite/modulo testsuite/numsub \
+ testsuite/numsub2 testsuite/numsub3 testsuite/numsub4 \
+ testsuite/numsub5 testsuite/0range testsuite/bkslashes \
+ testsuite/head testsuite/madding testsuite/mac-mf \
+ testsuite/empty testsuite/xbxcx testsuite/xbxcx3 \
+ testsuite/recall testsuite/recall2 testsuite/xemacs \
+ testsuite/fasts testsuite/uniq testsuite/manis \
+ testsuite/khadafy testsuite/linecnt testsuite/eval \
+ testsuite/distrib testsuite/8to7 testsuite/y-bracket \
+ testsuite/y-newline testsuite/y-zero testsuite/allsub \
+ testsuite/cv-vars testsuite/classes testsuite/middle \
+ testsuite/bsd testsuite/stdin testsuite/flipcase \
+ testsuite/insens testsuite/subwrite testsuite/writeout \
+ testsuite/readin testsuite/insert testsuite/utf8-1 \
+ testsuite/utf8-2 testsuite/utf8-3 testsuite/utf8-4 \
+ testsuite/badenc testsuite/inplace-hold testsuite/brackets \
+ testsuite/amp-escape testsuite/help testsuite/file \
+ testsuite/quiet testsuite/factor testsuite/binary3 \
+ testsuite/binary2 testsuite/binary testsuite/dc \
+ testsuite/newline-anchor testsuite/zero-anchor
+
+# Note that the first lines are statements. They ensure that environment
+# variables that can perturb tests are unset or set to expected values.
+# The rest are envvar settings that propagate build-related Makefile
+# variables to test scripts.
+TESTS_ENVIRONMENT = \
+ tmp__=$${TMPDIR-/tmp}; \
+ test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.; \
+ . $(srcdir)/testsuite/envvar-check; \
+ TMPDIR=$$tmp__; export TMPDIR; \
+ \
+ if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
+ export_with_values () { export "$$@"; }; \
+ else \
+ export_with_values () \
+ { \
+ sed_extract_var='s/=.*//'; \
+ sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
+ for arg in "$$@"; do \
+ var=`echo "$$arg" | sed "$$sed_extract_var"`; \
+ arg=`echo "$$arg" | sed "$$sed_quote_value"`; \
+ eval "$$arg"; \
+ export "$$var"; \
+ done; \
+ }; \
+ fi; \
+ \
+ export_with_values \
+ VERSION='$(VERSION)' \
+ LOCALE_FR='$(LOCALE_FR)' \
+ LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)' \
+ LOCALE_JA='$(LOCALE_JA)' \
+ AWK=$(AWK) \
+ LC_ALL=C \
+ abs_top_builddir='$(abs_top_builddir)' \
+ abs_top_srcdir='$(abs_top_srcdir)' \
+ abs_srcdir='$(abs_srcdir)' \
+ built_programs=sed; \
+ srcdir='$(srcdir)' \
+ top_srcdir='$(top_srcdir)' \
+ CC='$(CC)' \
+ SED_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
+ MAKE=$(MAKE) \
+ MALLOC_PERTURB_=$(MALLOC_PERTURB_) \
+ PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)' \
+ PACKAGE_VERSION=$(PACKAGE_VERSION) \
+ PERL='$(PERL)' \
+ SHELL='$(SHELL)' \
+ PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
+ $(LOCALCHARSET_TESTS_ENVIRONMENT) \
+ ; 9>&2
+
+LOG_COMPILER = $(top_srcdir)/testsuite/runtest
+
+
+EXTRA_DIST += \
+ $(T) \
+ testsuite/init.sh init.cfg \
+ testsuite/envvar-check \
+ testsuite/PCRE.tests testsuite/BOOST.tests testsuite/SPENCER.tests \
+ testsuite/runtest testsuite/Makefile.tests \
+ testsuite/0range.good \
+ testsuite/0range.inp \
+ testsuite/0range.sed \
+ testsuite/8bit.good \
+ testsuite/8bit.inp \
+ testsuite/8bit.sed \
+ testsuite/8to7.good \
+ testsuite/8to7.inp \
+ testsuite/8to7.sed \
+ testsuite/allsub.good \
+ testsuite/allsub.inp \
+ testsuite/allsub.sed \
+ testsuite/amp-escape.good \
+ testsuite/amp-escape.inp \
+ testsuite/amp-escape.sed \
+ testsuite/appquit.good \
+ testsuite/appquit.inp \
+ testsuite/appquit.sed \
+ testsuite/binary.good \
+ testsuite/binary.inp \
+ testsuite/binary.sed \
+ testsuite/binary2.sed \
+ testsuite/binary3.sed \
+ testsuite/bkslashes.good \
+ testsuite/bkslashes.inp \
+ testsuite/bkslashes.sed \
+ testsuite/brackets.good \
+ testsuite/brackets.inp \
+ testsuite/brackets.sed \
+ testsuite/bsd.good \
+ testsuite/bsd.sh \
+ testsuite/cv-vars.good \
+ testsuite/cv-vars.inp \
+ testsuite/cv-vars.sed \
+ testsuite/classes.good \
+ testsuite/classes.inp \
+ testsuite/classes.sed \
+ testsuite/dc.good \
+ testsuite/dc.inp \
+ testsuite/dc.sed \
+ testsuite/distrib.good \
+ testsuite/distrib.inp \
+ testsuite/distrib.sed \
+ testsuite/distrib.sh \
+ testsuite/dollar.good \
+ testsuite/dollar.inp \
+ testsuite/dollar.sed \
+ testsuite/empty.good \
+ testsuite/empty.inp \
+ testsuite/empty.sed \
+ testsuite/enable.good \
+ testsuite/enable.inp \
+ testsuite/enable.sed \
+ testsuite/eval.good \
+ testsuite/eval.inp \
+ testsuite/eval.sed \
+ testsuite/factor.good \
+ testsuite/factor.inp \
+ testsuite/factor.sed \
+ testsuite/fasts.good \
+ testsuite/fasts.inp \
+ testsuite/fasts.sed \
+ testsuite/flipcase.good \
+ testsuite/flipcase.inp \
+ testsuite/flipcase.sed \
+ testsuite/head.good \
+ testsuite/head.inp \
+ testsuite/head.sed \
+ testsuite/inclib.good \
+ testsuite/inclib.inp \
+ testsuite/inclib.sed \
+ testsuite/insens.good \
+ testsuite/insens.inp \
+ testsuite/insens.sed \
+ testsuite/insert.good \
+ testsuite/insert.inp \
+ testsuite/insert.sed \
+ testsuite/khadafy.good \
+ testsuite/khadafy.inp \
+ testsuite/khadafy.sed \
+ testsuite/linecnt.good \
+ testsuite/linecnt.inp \
+ testsuite/linecnt.sed \
+ testsuite/space.good \
+ testsuite/space.inp \
+ testsuite/space.sed \
+ testsuite/mac-mf.good \
+ testsuite/mac-mf.inp \
+ testsuite/mac-mf.sed \
+ testsuite/madding.good \
+ testsuite/madding.inp \
+ testsuite/madding.sed \
+ testsuite/manis.good \
+ testsuite/manis.inp \
+ testsuite/manis.sed \
+ testsuite/middle.good \
+ testsuite/middle.sed \
+ testsuite/middle.inp \
+ testsuite/modulo.good \
+ testsuite/modulo.sed \
+ testsuite/modulo.inp \
+ testsuite/newjis.good \
+ testsuite/newjis.inp \
+ testsuite/newjis.sed \
+ testsuite/newline-anchor.good \
+ testsuite/newline-anchor.inp \
+ testsuite/newline-anchor.sed \
+ testsuite/noeol.good \
+ testsuite/noeol.inp \
+ testsuite/noeol.sed \
+ testsuite/noeolw.good \
+ testsuite/noeolw.1good \
+ testsuite/noeolw.2good \
+ testsuite/noeolw.sed \
+ testsuite/numsub.good \
+ testsuite/numsub.inp \
+ testsuite/numsub.sed \
+ testsuite/numsub2.good \
+ testsuite/numsub2.inp \
+ testsuite/numsub2.sed \
+ testsuite/numsub3.good \
+ testsuite/numsub3.inp \
+ testsuite/numsub3.sed \
+ testsuite/numsub4.good \
+ testsuite/numsub4.inp \
+ testsuite/numsub4.sed \
+ testsuite/numsub5.good \
+ testsuite/numsub5.inp \
+ testsuite/numsub5.sed \
+ testsuite/readin.good \
+ testsuite/readin.inp \
+ testsuite/readin.sed \
+ testsuite/recall.good \
+ testsuite/recall.inp \
+ testsuite/recall.sed \
+ testsuite/recall2.good \
+ testsuite/recall2.inp \
+ testsuite/recall2.sed \
+ testsuite/sep.good \
+ testsuite/sep.inp \
+ testsuite/sep.sed \
+ testsuite/subwrite.inp \
+ testsuite/subwrite.sed \
+ testsuite/subwrt1.good \
+ testsuite/subwrt2.good \
+ testsuite/uniq.good \
+ testsuite/uniq.inp \
+ testsuite/uniq.sed \
+ testsuite/utf8-1.good \
+ testsuite/utf8-1.inp \
+ testsuite/utf8-1.sed \
+ testsuite/utf8-2.good \
+ testsuite/utf8-2.inp \
+ testsuite/utf8-2.sed \
+ testsuite/utf8-3.good \
+ testsuite/utf8-3.inp \
+ testsuite/utf8-3.sed \
+ testsuite/utf8-4.good \
+ testsuite/utf8-4.inp \
+ testsuite/utf8-4.sed \
+ testsuite/badenc.good \
+ testsuite/badenc.inp \
+ testsuite/badenc.sed \
+ testsuite/writeout.inp \
+ testsuite/writeout.sed \
+ testsuite/wrtout1.good \
+ testsuite/wrtout2.good \
+ testsuite/xabcx.good \
+ testsuite/xabcx.inp \
+ testsuite/xabcx.sed \
+ testsuite/xbxcx.good \
+ testsuite/xbxcx.inp \
+ testsuite/xbxcx.sed \
+ testsuite/xbxcx3.good \
+ testsuite/xbxcx3.inp \
+ testsuite/xbxcx3.sed \
+ testsuite/xemacs.good \
+ testsuite/xemacs.inp \
+ testsuite/xemacs.sed \
+ testsuite/y-bracket.good \
+ testsuite/y-bracket.sed \
+ testsuite/y-bracket.inp \
+ testsuite/y-zero.good \
+ testsuite/y-zero.sed \
+ testsuite/y-zero.inp \
+ testsuite/y-newline.good \
+ testsuite/y-newline.sed \
+ testsuite/y-newline.inp \
+ testsuite/zero-anchor.good \
+ testsuite/zero-anchor.sed \
+ testsuite/zero-anchor.inp
+
+# automake makes `check' depend on $(TESTS). Declare
+# dummy targets for $(TESTS) so that make does not complain.
+
+.PHONY: $(SEDTESTS)
+$(SEDTESTS):
diff --git a/testsuite/mac-mf.good b/testsuite/mac-mf.good
index 9be165d..4e8bc45 100644
--- a/testsuite/mac-mf.good
+++ b/testsuite/mac-mf.good
@@ -6,72 +6,72 @@
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
# This first part is long enough that NFS:Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make
#
@@ -80,18 +80,18 @@
WHAT = mac
-# Directory syntax
+# Directory syntax
R=
C=
S=:
U=:
BUILDTOP = :::
-srcdir =
+srcdir =
# FIXME This doesn't translate to MPW yet, srcdir must be same as objdir
# File in object dir can come from either the current dir or srcdir
-#
+#
# . . "{srcdir}"
# Default rule that puts each file into separate segment
@@ -106,8 +106,8 @@ LD = link
# The funny quoting in the LDFLAGS is to avoid xxx.c.o being mangled by
# mac-mf.sed into xxx.c.o
LDFLAGS=-t MPST -c "MPS " -sym on {Libraries}"Runtime."o {CLibraries}"StdClib."o {Libraries}"ToolLibs."o {Libraries}"Interface."o
-CCOPTS =
-LIBS =
+CCOPTS =
+LIBS =
KRB5ROOT= @KRB5ROOT@
KRB4=@KRB4@
INSTALL=Duplicate -y
@@ -157,7 +157,7 @@ OBJEXT = c.o
LIBEXT = a
EXEEXT =
-all
+all
# Generated automatically from Makefile.in by configure
CFLAGS = {CCOPTS} {DEFS} -i ::des
@@ -169,32 +169,32 @@ OBJS= md5.{OBJEXT} md5glue.{OBJEXT} md5crypto.{OBJEXT}
SRCS= md5.c md5glue.c md5crypto.c
-all {OBJS}
+all {OBJS}
t_mddriver t_mddriver.c.o md5.c.o
Link {LDFLAGS} -o t_mddriver t_mddriver.c.o md5.c.o
-t_mddriver.exe
+t_mddriver.exe
{CC} {CFLAGS2} -o t_mddriver.exe t_mddriver.c md5.c
check t_mddriver{EXEEXT}
{C}t_mddriver{EXEEXT} -x
-clean
+clean
{RM} t_mddriver{EXEEXT} t_mddriver.{OBJEXT}
# config:post.in
# put all first just in case no other rules occur here
#
-all
+all
-check
+check
clean clean-{WHAT}
{RM} config.log pre.c.out post.c.out Makefile.c.out
-clean-unix
+clean-unix
if test -n "{OBJS}" ; then {RM} {OBJS}; else ; fi
-clean-windows
+clean-windows
{RM} .{OBJEXT}
{RM} msvc.pdb .err
diff --git a/testsuite/mac-mf.inp b/testsuite/mac-mf.inp
index 3adaee2..7d80191 100644
--- a/testsuite/mac-mf.inp
+++ b/testsuite/mac-mf.inp
@@ -6,72 +6,72 @@
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
# This first part is long enough that NFS/Share doesn't notice the non-ASCII
# characters in the rest of the file, so it claims that the file is type
-# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
+# TEXT, which is what we want. The non-ASCII chars are necessary for MPW
# Make.
#
@@ -91,7 +91,7 @@ srcdir = .
# FIXME: This doesn't translate to MPW yet, srcdir must be same as objdir.
# File in object dir can come from either the current dir or srcdir.
-#
+#
# . : . "{srcdir}"
# Default rule that puts each file into separate segment.
@@ -106,8 +106,8 @@ LD = link
# The funny quoting in the LDFLAGS is to avoid xxx.o being mangled by
# mac-mf.sed into xxx.c.o.
LDFLAGS=-t MPST -c "MPS " -sym on {Libraries}"Runtime."o {CLibraries}"StdClib."o {Libraries}"ToolLibs."o {Libraries}"Interface."o
-CCOPTS =
-LIBS =
+CCOPTS =
+LIBS =
KRB5ROOT= @KRB5ROOT@
KRB4=@KRB4@
INSTALL=Duplicate -y
@@ -169,7 +169,7 @@ OBJS= md5.$(OBJEXT) md5glue.$(OBJEXT) md5crypto.$(OBJEXT)
SRCS= $(srcdir)/md5.c $(srcdir)/md5glue.c $(srcdir)/md5crypto.c
-all:: $(OBJS)
+all:: $(OBJS)
t_mddriver: t_mddriver.o md5.o
$(CC) $(CFLAGS) $(LDFLAGS) -o t_mddriver t_mddriver.o md5.o
diff --git a/testsuite/mac-mf.sed b/testsuite/mac-mf.sed
index 9b08e60..680ce89 100644
--- a/testsuite/mac-mf.sed
+++ b/testsuite/mac-mf.sed
@@ -26,7 +26,7 @@
# Rules for .. and . elsewhere in the line
# Convert ../: to ::, recur to get whole paths.
/\./s,\.\./:,::,g
-# Convert ../../ to :::
+# Convert ../../ to :::
/\./s,\.\./\.\./,:::,g
/\./s,\.\./,::,g
/\.\//s,\./,:,g
@@ -152,3 +152,4 @@
/Option/s/\\Option-f//g
/Option/s/\\Option-d//g
/Option/s/\\Option-x//g
+s/ $//
diff --git a/testsuite/manis.sed b/testsuite/manis.sed
index 5017845..51c9a50 100644
--- a/testsuite/manis.sed
+++ b/testsuite/manis.sed
@@ -1,6 +1,6 @@
# straight out of an autoconf-generated configure.
# The input should look just like the input after this is run.
#
-# Protect against being on the right side of a sed subst in config.status.
-s/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
+# Protect against being on the right side of a sed subst in config.status.
+s/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g$/%g/
diff --git a/testsuite/mb-bad-delim.sh b/testsuite/mb-bad-delim.sh
new file mode 100755
index 0000000..ac43a49
--- /dev/null
+++ b/testsuite/mb-bad-delim.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+# Test 's' and 'y' non-slash delimiters in multibyte locales
+
+# Copyright (C) 2016 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
+
+fail=0
+require_en_utf8_locale_
+
+# These tests use the following unicode character in various ways:
+# GREEK CAPITAL LETTER PHI (U+03A6)
+# UTF-8: hex: 0xCE 0xA6
+# oct: 0316 0246
+# bin: 11001110 10100110
+#
+# Octal encoding is used due to printf not supporting hex on older systems.
+# Using the first octet alone (\316) causes various multibyte related functions
+# to return '-2' (incomplete multibyte sequence).
+# using the second octet alone (\246) causess same functions to return '-1'
+# (ivalid multibyte sequence).
+
+
+# Reject a valid multibyte delimiter (instead of slash).
+printf 's\316\246a\316\246b\316\246' > prog1 || framework_failure_
+
+cat <<\EOF > exp-err1 || framework_failure_
+sed: file prog1 line 1: delimiter character is not a single-byte character
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f prog1 < /dev/null 2>err1 || fail=1
+compare_ exp-err1 err1 || fail=1
+
+
+# Reject an incomplete multibyte delimiter (instead of slash).
+# This is an implmentation-specific behavior:
+# error is triggered upon first octet, before entire multibyte character
+# is scanned.
+printf 's\316a\316b\316' > prog2 || framework_failure_
+
+cat <<\EOF > exp-err2 || framework_failure_
+sed: file prog2 line 1: delimiter character is not a single-byte character
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f prog2 </dev/null 2>err2 || fail=1
+compare_ exp-err2 err2 || fail=1
+
+# ... but accept octet \316 as delimiter in C locale
+echo a > in2 || framework_failure_
+echo b > exp2 || framework_failure_
+LC_ALL=C sed -f prog2 <in2 >out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+
+
+# An invalid multibyte sequence is treated as a valid single byte,
+# thus accepted as a delimter (instead of slash).
+# This is an implmentation-specific behavior.
+printf 's\246a\246b\246' > prog3 || framework_failure_
+echo a > in3 || framework_failure_
+echo b > exp3 || framework_failure_
+
+LC_ALL=en_US.UTF-8 sed -f prog3 <in3 >out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+# Expect identical result in C locale
+LC_ALL=C sed -f prog3 <in3 >out4 || fail=1
+compare_ exp3 out4 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/mb-charclass-non-utf8.sh b/testsuite/mb-charclass-non-utf8.sh
new file mode 100755
index 0000000..ab3d2fd
--- /dev/null
+++ b/testsuite/mb-charclass-non-utf8.sh
@@ -0,0 +1,132 @@
+#!/bin/sh
+# Test multibyte locale which is not UTF-8 (ja_JP.shift_jis)
+# This is a stateful locale. Same byte value can be either
+# a single-byte character, or the second byte of a multibyte
+# character.
+
+# Copyright (C) 2016 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
+
+# If found, LOCALE_JA_SJIS will contain the locale name.
+require_ja_shiftjis_locale_
+
+# Ensure the implementation is not buggy (skip otherwise)
+require_valid_ja_shiftjis_locale_ "$LOCALE_JA_SJIS"
+
+fail=0
+
+# This test uses two characters:
+# Unicode Character 'KATAKANA LETTER ZE' (U+30BC)
+# Unicode Character 'KATAKANA LETTER ZO' (U+30BE)
+#
+# In SHIFT-JIS locale, these multibyte characters contain
+# open/close brackets (ASCII 0x5B/0x5D) as the trailing byte.
+#
+# See also:
+# https://en.wikipedia.org/wiki/Shift_JIS
+# http://www.rikai.com/library/kanjitables/kanji_codes.sjis.shtml
+
+# Unicode Character 'KATAKANA LETTER ZE' (U+30BC)
+#
+# UTF-8: hex: 0xE3 0x82 0xBC
+# bin: 11100011 10000010 10111100
+#
+# Shift-jis hex: 0x83 0x5B
+# oct: 203 133
+# bin: 10000011 01011011
+#
+# Conversion example:
+# $ printf '\x83\x5B' | iconv -f SHIFT-JIS -t UTF-8 | od -tx1o1c
+# 0000000 e3 82 bc
+# 343 202 274
+# 343 202 274
+
+# Unicode Character 'KATAKANA LETTER ZO' (U+30BE)
+#
+# UTF-8: hex: 0xE3 0x82 0xBE
+# bin: 11100011 10000010 10111110
+#
+# Shift-jis hex: 0x83 0x5D
+# oct: 203 135
+# bin: 10000011 01011101
+#
+# Conversion example:
+# $ printf '\x83\x5D' | iconv -f SHIFT-JIS -t UTF-8 | od -tx1o1c
+# 0000000 e3 82 be
+# 343 202 276
+# 343 202 276
+#
+
+
+#
+# Tests 1,2: Test y/// command with multibyte, non-utf8 seqeunce.
+# Implmenetation notes: str_append() has special code path for non-utf8 cases.
+#
+
+# Test 1: valid multibyte seqeunce
+printf 'y/a/\203\133/' > p1 || framework_failure_
+echo Xa > in1 || framework_failure_
+printf 'X\203\133\n' > exp1 || framework_failure_
+
+LC_ALL="$LOCALE_JA_SJIS" sed -f p1 <in1 >out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# Test 2: invalid multibyte seqeunce, treated as two single-byte characters.
+printf 'y/aa/\203\060/' > p2 || framework_failure_
+LC_ALL="$LOCALE_JA_SJIS" sed -f p2 </dev/null 2>out2 || fail=1
+compare_ /dev/null out2 || fail=1
+
+#
+# Test 3: multibyte character class with these characters.
+#
+# Before sed-4.3, snarf_char_class would parse it incorrectly,
+# Treating the first closing-bracket as closing the character-class,
+# instead of being part of a multibyte sequence.
+
+printf '/[\203]/]/p' > p3 || framework_failure_
+LC_ALL="$LOCALE_JA_SJIS" sed -f p3 </dev/null >out3 || fail=1
+compare_ /dev/null out3 || fail=1
+
+# Test 4:
+# Same as test 3, but with the other multibyte character.
+# (this did not cause a failure before sed-4.3, but the code was incorrect).
+# Keep this test for code-coverage purposes.
+printf '/[\203[/]/p' > p4 || framework_failure_
+LC_ALL="$LOCALE_JA_SJIS" sed -f p4 </dev/null >out4 || fail=1
+compare_ /dev/null out4 || fail=1
+
+# TODO: Find a locale in which ':.=' can be part of a valid multibyte octet.
+#
+# snarf_char_class specifically tests for five bytes: ':.=[]' .
+# '[' and ']' are tested above, yet '.:=' are not valid as part of a
+# multibyte shift-jis sequence.
+#
+# valid:
+# $ printf '\203]' | iconv -f SHIFT-JIS -t utf-8
+# $ printf '\203[' | iconv -f SHIFT-JIS -t utf-8
+#
+# invalid:
+# $ printf '\203:' | iconv -f SHIFT-JIS -t utf-8
+# iconv: (stdin):1:0: cannot convert
+#
+# $ printf '\203=' | iconv -f SHIFT-JIS -t utf-8
+# iconv: (stdin):1:0: cannot convert
+#
+# $ printf '\203.' | iconv -f SHIFT-JIS -t utf-8
+# iconv: (stdin):0:0: cannot convert
+
+Exit $fail
diff --git a/testsuite/mb-match-slash.sh b/testsuite/mb-match-slash.sh
new file mode 100755
index 0000000..787b5d6
--- /dev/null
+++ b/testsuite/mb-match-slash.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Test slash following an incomplete multibyte character
+
+# Copyright (C) 2016 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_en_utf8_locale_
+
+fail=0
+
+# before sed-4.3, a slash following an incomplete multibyte character
+# would be ignored during program compilation, leading to an error.
+
+
+# Test 1: match_slash in 's' command.
+# Before sed-4.3, this would fail with "unterminated `s' command".
+printf 's/\316/X/' > p1 || framework_failure_
+LC_ALL=en_US.UTF-8 sed -f p1 </dev/null >out1 || fail=1
+compare_ /dev/null out1 || fail=1
+
+# Test 2: match_slash in address regex.
+# Before sed-4.3, this would fail with "unterminated address regex".
+printf '/\316/p' >p2 || framework_failure_
+LC_ALL=en_US.UTF-8 sed -f p2 </dev/null >out2 || fail=1
+compare_ /dev/null out2 || fail=1
+
+# Test 3: match_slash in 'y' command..
+# Before sed-4.3, this would fail with "unterminated `y' command".
+printf 'y/\316/X/' >p3 || framework_failure_
+LC_ALL=en_US.UTF-8 sed -f p3 </dev/null >out3 || fail=1
+compare_ /dev/null out3 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/mb-y-translate.sh b/testsuite/mb-y-translate.sh
new file mode 100755
index 0000000..a1f59c4
--- /dev/null
+++ b/testsuite/mb-y-translate.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+# Test multibyte y/// translations
+
+# Copyright (C) 2016 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
+
+fail=0
+require_en_utf8_locale_
+
+# These tests use the following unicode characters in various ways:
+# GREEK CAPITAL LETTER PHI (U+03A6)
+# UTF-8: hex: 0xCE 0xA6
+# oct: 0316 0246
+# bin: 11001110 10100110
+#
+# GREEK CAPITAL LETTER DELTA (U+0394)
+# UTF-8: hex: 0xCE 0x94
+# oct: 0316 0224
+# bin: 11001110 10010100
+#
+# Octal encoding is used due to printf not supporting hex on older systems.
+# Using the first octet alone (\316) causes various multibyte related functions
+# to return '-2' (incomplete multibyte sequence).
+# using the second octet alone (\246) causess same functions to return '-1'
+# (invalid multibyte sequence).
+
+
+#
+# Test 1: valid multibyte 'dest-chars'
+#
+printf 'y/a/\316\246/' > p1 || framework_failure_
+echo Xa > in1 || framework_failure_
+printf 'X\316\246\n' > exp1 || framework_failure_
+
+LC_ALL=en_US.UTF-8 sed -f p1 <in1 >out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# in C locale, report error of mismatched length
+cat <<\EOF > exp-err1 || framework_failure_
+sed: file p1 line 1: strings for `y' command are different lengths
+EOF
+returns_ 1 env LC_ALL=C sed -f p1 </dev/null 2>err1 || fail=1
+compare_ exp-err1 err1 || fail=1
+
+
+#
+# Test 2: valid multibyte 'src-chars'
+#
+printf 'y/\316\246/a/' > p2 || framework_failure_
+printf 'X\316\246\n' > in2 || framework_failure_
+echo Xa > exp2 || framework_failure_
+
+LC_ALL=en_US.UTF-8 sed -f p2 <in2 >out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+# in C locale, report error of mismatched length
+cat <<\EOF > exp-err2 || framework_failure_
+sed: file p2 line 1: strings for `y' command are different lengths
+EOF
+returns_ 1 env LC_ALL=C sed -f p2 </dev/null 2>err2 || fail=1
+compare_ exp-err2 err2 || fail=1
+
+
+#
+# Tests 3-6: invalid/incomplete multibyte characters in src/dest.
+# All work as-is in C locale, treated as single-bytes in multibyte locales.
+# None should fail.
+
+# Test 3: invalid multibyte 'dest-chars'.
+echo Xa > in3 || framework_failure_
+printf 'y/a/\246/' > p3 || framework_failure_
+printf 'X\246\n' > exp3 || framework_failure_
+
+# Test 4: incomplete multibyte 'dest-chars'.
+echo Xa > in4 || framework_failure_
+printf 'y/a/\316/' > p4 || framework_failure_
+printf 'X\316\n' > exp4 || framework_failure_
+
+# Test 5: invalid multibyte 'src-chars'.
+printf 'X\246\n' > in5 || framework_failure_
+printf 'y/\246/a/' > p5 || framework_failure_
+echo Xa > exp5 || framework_failure_
+
+# Test 6: incomplete multibyte 'dest-chars'.
+printf 'X\316\n' > in6 || framework_failure_
+printf 'y/\316/a/' > p6 || framework_failure_
+echo Xa > exp6 || framework_failure_
+
+for t in 3 4 5 6 ;
+do
+ for l in C en_US.UTF-8 ;
+ do
+ LC_ALL=$l sed -f p$t <in$t >out$t-$l || fail=1
+ compare_ exp$t out$t-$l || fail=1
+ done
+done
+
+
+#
+# Tests 7,8: length mismatch in multibyte locales
+# Implementation note: the code path for length check differ between
+# single-byte/multibyte locales. The actual characters don't have to be
+# multibyte themselves.
+printf 'y/abc/d/' > p7 || framework_failure_
+cat <<\EOF > exp-err7 || framework_failure_
+sed: file p7 line 1: strings for `y' command are different lengths
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f p7 </dev/null 2>err7 || fail=1
+compare_ exp-err7 err7 || fail=1
+
+printf 'y/a/bcd/' > p8 || framework_failure_
+cat <<\EOF > exp-err8 || framework_failure_
+sed: file p8 line 1: strings for `y' command are different lengths
+EOF
+
+returns_ 1 env LC_ALL=en_US.UTF-8 sed -f p8 </dev/null 2>err8 || fail=1
+compare_ exp-err8 err8 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/newline-anchor.good b/testsuite/newline-anchor.good
new file mode 100644
index 0000000..5742735
--- /dev/null
+++ b/testsuite/newline-anchor.good
@@ -0,0 +1,3 @@
+XXaY
+XbY
+XcYY
diff --git a/testsuite/newline-anchor.inp b/testsuite/newline-anchor.inp
new file mode 100644
index 0000000..de98044
--- /dev/null
+++ b/testsuite/newline-anchor.inp
@@ -0,0 +1,3 @@
+a
+b
+c
diff --git a/testsuite/newline-anchor.sed b/testsuite/newline-anchor.sed
new file mode 100644
index 0000000..b3d2de1
--- /dev/null
+++ b/testsuite/newline-anchor.sed
@@ -0,0 +1,6 @@
+N
+N
+s/^/X/g
+s/^/X/mg
+s/$/Y/g
+s/$/Y/mg
diff --git a/testsuite/normalize-text.sh b/testsuite/normalize-text.sh
new file mode 100644
index 0000000..9a34a03
--- /dev/null
+++ b/testsuite/normalize-text.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Text text escaping (compile.c:normalize_text()).
+# NOTE:
+# \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.
+
+# 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
+
+fail=0
+
+#
+# Common backslash combinations
+#
+printf "%s\n" a a a a a a >in1 || framework_failure_
+cat <<\EOF >prog1 || framework_failure_
+1y/a/\a/
+2y/a/\f/
+3y/a/\n/
+4y/a/\r/
+5y/a/\t/
+6y/a/\v/
+EOF
+printf "\a\n\f\n\n\n\r\n\t\n\v\n" > exp1 || framework_failure_
+
+sed -f prog1 in1 > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+#
+# test '\\\n' (backslash followed by ASCII 0x0A)
+# normalized to a simple '\n' .
+#
+echo a > in2 || framework_failure_
+printf "y/a/\\\n/" > prog2 || framework_failure_
+printf "\n\n" > exp2 || framework_failure_
+sed -f prog2 in2 > out2 || fail=1
+compare_ exp2 out2 || fail=1
+
+#
+# \cX combination
+#
+printf "%s\n" a a a a a a a a a a > in3 || framework_failure_
+cat <<\EOF >prog3 || framework_failure_
+1y/a/\cA/
+2y/a/\ca/
+3y/a/\cZ/
+4y/a/\cz/
+5y/a/\c{/
+6y/a/\c;/
+7y/a/\c#/
+8y/a/\c[/
+9y/a/\c\\/
+10y/a/\c]/
+EOF
+
+printf "\1\n\1\n\32\n\32\n;\n{\nc\n\33\n\34\n\35\n" > exp3 || framework_failure_
+sed -f prog3 in3 > out3 || fail=1
+compare_ exp3 out3 || fail=1
+
+# \c at end of (valid) text - normalize_text() stops, returns control to caller.
+# TODO: is this a bug?
+# compare with 'y/a/\d/' and 'y/a/\x/'
+cat <<\EOF >exp-err-c || framework_failure_
+sed: -e expression #1, char 7: strings for `y' command are different lengths
+EOF
+returns_ 1 sed 'y/a/\c/' </dev/null 2>err-c || fail=1
+compare_ exp-err-c err-c || fail=1
+
+Exit $fail
diff --git a/testsuite/nulldata.sh b/testsuite/nulldata.sh
new file mode 100755
index 0000000..91befc6
--- /dev/null
+++ b/testsuite/nulldata.sh
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Test -z/--null-data option
+
+# Copyright (C) 2016 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
+
+# Two lines, differ based on the EOL character.
+printf "AB\000CD\nEF\n\000" > in1 || framework_failure_
+
+# 's/^./x/' cmd processed with EOF=\n
+printf "xB\000CD\nxF\nx" > exp-s-nl || framework_failure_
+# 's/^./x/' cmd processed with EOF=\0
+printf "xB\000xD\nEF\n\000" > exp-s-z || framework_failure_
+
+# '=' cmd processed with EOF=\n
+printf "1\nAB\000CD\n2\nEF\n3\n\000" > exp-=-nl || framework_failure_
+
+# '=' cmd processed with EOF=\0
+printf "1\000AB\0002\000CD\nEF\n\000" > exp-=-z || framework_failure_
+
+
+# 'l' cmd processed with EOF=\n
+cat <<\EOF >exp-l-nl || framework_failure_
+AB\000CD$
+EF$
+\000$
+EOF
+
+# 'l' cmd processed with EOF=\0
+printf 'AB$\000CD\\nEF\\n$\000' >exp-l-z || framework_failure_
+
+# 'F' cmd with EOL=\n
+printf "in1\n" > exp-F-nl || framework_failure_
+
+# 'F' cmd with EOL=\0
+printf "in1\000" > exp-F-z || framework_failure_
+
+
+# Test substitution
+sed 's/^./x/' in1 > out-s-nl || fail=1
+compare_ exp-s-nl out-s-nl || fail=1
+
+sed -z 's/^./x/' in1 > out-s-z || fail=1
+compare_ exp-s-z out-s-z || fail=1
+
+
+
+# Test '=' command
+sed = in1 > out-=-nl || fail=1
+compare_ exp-=-nl out-=-nl || fail=1
+
+sed -z = in1 > out-=-z || fail=1
+compare_ exp-=-z out-=-z || fail=1
+
+
+
+# Test 'l' command
+sed -n l in1 > out-l-nl || fail=1
+compare_ exp-l-nl out-l-nl || fail=1
+
+sed -zn l in1 > out-l-z || fail=1
+compare_ exp-l-z out-l-z || fail=1
+
+
+# Test 'F' command
+sed -n 1F in1 > out-F-nl || fail=1
+compare_ exp-F-nl out-F-nl || fail=1
+
+sed -zn 1F in1 > out-F-z || fail=1
+compare_ exp-F-z out-F-z || fail=1
+
+
+Exit $fail
diff --git a/testsuite/panic-tests.sh b/testsuite/panic-tests.sh
new file mode 100644
index 0000000..a2dba00
--- /dev/null
+++ b/testsuite/panic-tests.sh
@@ -0,0 +1,101 @@
+#!/bin/sh
+# Exercise some panic stops
+
+# Copyright (C) 2016 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
+
+#
+# failure to create temp file
+#
+
+# inplace with an unwritable directory
+mkdir a || framework_failure_
+touch a/a || framework_failure_
+chmod a-w a || framework_failure_
+
+# Expected error message, with actual filename/errno trimmed
+cat <<\EOF >exp-err-temp || framework_failure_
+sed: couldn't open temporary file
+EOF
+
+# TODO: why exit-code 4 (currently hard-coded)
+returns_ 4 sed -i = a/a 2>err-temp || fail=1
+
+# trim the filename/errno message (using sed itself...)
+sed -i 's/file.*$/file/' err-temp || framework_failure_
+compare_ exp-err-temp err-temp || fail=1
+
+# restore writability, to ensure it can be deleted
+chmod a+w a || framework_failure_
+
+
+#
+# no input files (with inplace)
+#
+
+# Expected error message
+cat <<\EOF> exp-err-no-files || framework_failure_
+sed: no input files
+EOF
+
+# /dev/null to ensure it doesn't hang if panic is not invoked
+returns_ 4 sed -i = </dev/null 2>err-no-files || fail=1
+compare_ exp-err-no-files err-no-files || fail=1
+
+
+#
+# Not a regular file (with inplace)
+#
+cat <<\EOF >exp-err-not-reg-file || framework_failure_
+sed: couldn't edit f: not a regular file
+EOF
+
+mkfifo f || framework_failure_
+
+# NOTE: the file-mode check is not performed until the first line is read.
+# an empty/blocking fifo will hang forever.
+printf a > f &
+
+# TODO: add a timeout in case of bug leading to a blocking fifo?
+returns_ 4 sed -i = f 2>err-not-reg-file || fail=1
+compare_ exp-err-not-reg-file err-not-reg-file || fail=1
+
+
+#
+# inplace on a terminal device
+# (if available)
+#
+
+#NOTE: device name is replaced later
+cat <<\EOF >exp-err-tty || framework_failure_
+sed: couldn't edit X: is a terminal
+EOF
+
+ttydev=no-such-file
+type tty >/dev/null 2>&1 && ttydev=$(tty 2>/dev/null)
+if test -w "$ttydev" ; then
+ returns_ 4 sed -i = "$ttydev" 2>err-tty || fail=1
+
+ # remove the actual terminal device name (using sed itself...)
+ sed -i 's/edit.*:/edit X:/' err-tty || framework_failure_
+
+ compare_ exp-err-tty err-tty || fail=1
+fi
+
+
+
+Exit $fail
diff --git a/testsuite/posix-char-class.sh b/testsuite/posix-char-class.sh
new file mode 100644
index 0000000..db7a97f
--- /dev/null
+++ b/testsuite/posix-char-class.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Test character-class definitions in POSIX mode.
+
+# Copyright (C) 2016 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/>.
+
+# NOTE:
+# In GNU Extension mode, all text is normalized (e.g. backslash-X combinations).
+# In POSIX mode, normalize_text() ensures content of character
+# classes is not normalized.
+#
+# Compare:
+# $ printf "t\t\n" | sed 's/[\t]/X/' | od -a
+# 0000000 t X nl
+# $ printf "t\t\n" | sed --posix 's/[\t]/X/' | od -a
+# 0000000 X ht nl
+#
+# This test unit validates the special handling of character classes
+# in posix mode (compile.c:normalize_text() implementation).
+
+
+. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
+print_ver_ sed
+
+fail=0
+
+echo X > exp || framework_failure_
+
+# Closing bracket without opening bracket, match as-is
+echo ']' | sed --posix 's/]/X/' > out1 || fail=1
+compare_ exp out1 || fail=1
+
+# Two opening brackets (same state when opening the second one)
+echo '[' | sed --posix 's/[[]/X/' > out2 || fail=1
+compare_ exp out2 || fail=1
+
+# Escaping before and after the character class, but not inside it (POSIX MODE)
+printf "\tt\t\n" | sed --posix 's/\t[\t]\t/X/' > out3 || fail=1
+compare_ exp out3 || fail=1
+
+# Escaping before, inside, and after the character class (GNU MODE)
+printf "\t\t\t\n" | sed 's/\t[\t]\t/X/' > out4 || fail=1
+compare_ exp out4 || fail=1
+
+# Special characters, but outside a valid character-class syntax
+printf "=\n" | sed --posix 's/[.=:.]/X/' > out5 || fail=1
+compare_ exp out5 || fail=1
+
+# A valid character class definition
+printf "b\n" | sed --posix 's/[[:alpha:]]/X/' > out6 || fail=1
+compare_ exp out6 || fail=1
+
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-N.sh b/testsuite/posix-mode-N.sh
new file mode 100755
index 0000000..2c7c128
--- /dev/null
+++ b/testsuite/posix-mode-N.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# Test 'N' command with/without posix conformity
+
+# Copyright (C) 2016 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
+
+fail=0
+
+# in/exp as identical, but using 'exp' for both input and output
+# will cause unneeded confusion when looking at the logs.
+printf "A\nB\n" > in1 || framework_failure_
+cp in1 exp1 || framework_failure_
+printf "A\n" > in2 || framework_failure_
+cp in2 exp2 || framework_failure_
+
+# If there is a 'next' line, N behaves the same regardless of posixicity
+sed N in1 > out1 || fail=1
+compare exp1 out1 || fail=1
+
+sed --posix N in1 > out2 || fail=1
+compare exp1 out2 || fail=1
+
+POSIXLY_CORRECT=y sed N in1 > out3 || fail=1
+compare exp1 out3 || fail=1
+
+
+# If there is no 'next' line,
+# gnu-N quits with printing
+# posix-N quits without printing.
+sed N in2 > out4 || fail=1
+compare exp2 out4 || fail=1
+
+sed --posix N in2 > out5 || fail=1
+compare /dev/null out5 || fail=1
+
+POSIXLY_CORRECT=y sed N in2 > out6 || fail=1
+compare /dev/null out6 || fail=1
+
+# exception: gnu-mode N but no default output, should not print anything.
+sed -n N in2 > out7 || fail=1
+compare /dev/null out7 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-addr.sh b/testsuite/posix-mode-addr.sh
new file mode 100644
index 0000000..6f3c112
--- /dev/null
+++ b/testsuite/posix-mode-addr.sh
@@ -0,0 +1,91 @@
+#!/bin/sh
+# Ensure GNU address extensions are rejected in posix mode
+
+# Copyright (C) 2016 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
+
+fail=0
+
+cat <<\EOF> exp-err-addr0 || framework_failure_
+sed: -e expression #1, char 6: invalid usage of line address 0
+EOF
+
+cat <<\EOF >exp-err-bad-addr || framework_failure_
+sed: -e expression #1, char 3: unexpected `,'
+EOF
+
+printf "%s\n" A B A C D E F G H I J >in1 || framework_failure_
+
+# The expected output with zero-line address '0,/A/'
+# the regex will match the first line
+printf "A\n" >exp-l0 || framework_failure_
+
+# The expected output with one-line address '1,/A/'
+# the regex will not be checked against the first line,
+# will match the third line
+printf "%s\n" A B A >exp-l1 || framework_failure_
+
+# The expected output with address '2,+1'
+# (from line 2, count 1 addition line = line 3)
+printf "%s\n" B A >exp-plus || framework_failure_
+
+# The expected output with address '5,~4'
+# (from line 5 till a multiple of 4 = line 8)
+printf "%s\n" D E F G >exp-mult || framework_failure_
+
+
+#
+# Addressing extension: 0,/regexp/
+#
+
+# sanity check: address line=1 is valid for both posix and gnu
+sed -n '1,/A/p' in1 > out-l1 || fail=1
+compare_ exp-l1 out-l1 || fail=1
+
+# address line=0 is a gnu extension
+sed -n '0,/A/p' in1 > out-gnu-l0 || fail=1
+compare_ exp-l0 out-gnu-l0 || fail=1
+# rejected in posix mode
+returns_ 1 sed --posix -n '0,/A/p' in1 2>err-posix-l0 || fail=1
+compare_ exp-err-addr0 err-posix-l0 || fail=1
+
+
+
+#
+# Addressing extension: addr,+N
+#
+sed -n '2,+1p' in1 > out-plus || fail=1
+compare_ exp-plus out-plus || fail=1
+
+returns_ 1 sed --posix -n '2,+1p' in1 2> err-plus || fail=1
+compare_ exp-err-bad-addr err-plus || fail=1
+
+
+
+#
+# Addressing extension: addr,~N
+#
+
+sed -n '5,~4p' in1 > out-mult || fail=1
+compare_ exp-mult out-mult || fail=1
+
+returns_ 1 sed --posix -n '5,~4p' in1 2> err-mult || fail=1
+compare_ exp-err-bad-addr err-mult || fail=1
+
+
+
+Exit $fail
diff --git a/testsuite/posix-mode-bad-ref.sh b/testsuite/posix-mode-bad-ref.sh
new file mode 100755
index 0000000..f578917
--- /dev/null
+++ b/testsuite/posix-mode-bad-ref.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Test non-posix-conforming gnu extensions when using --posix.
+
+# Copyright (C) 2016 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
+
+fail=0
+
+cat <<\EOF >exp-err || framework_failure_
+sed: -e expression #1, char 10: invalid reference \1 on `s' command's RHS
+EOF
+
+# Invalid references are errors in non-posix mode
+returns_ 1 sed 's/abc/\1/g' 2>err < /dev/null || fail=1
+compare_ exp-err err || fail=1
+
+# Invalid referencs are silently ignored in posix mode
+sed --posix 's/abc/\1/g' < /dev/null || fail=1
+
+Exit $fail
diff --git a/testsuite/posix-mode-s.sh b/testsuite/posix-mode-s.sh
new file mode 100644
index 0000000..d284a4d
--- /dev/null
+++ b/testsuite/posix-mode-s.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Ensure GNU extensions are rejected in posix mode
+
+# Copyright (C) 2016 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
+
+fail=0
+
+cat <<\EOF >exp-err || framework_failure_
+sed: -e expression #1, char 7: unknown option to `s'
+EOF
+
+# substitution command options (
+# TODO: conditionally test sSxX in perl mode
+for opt in i I m M ;
+do
+ # These options should fail in strict POSIX mode
+ returns_ 1 sed --posix "s/a/b/$opt" </dev/null 2>err || fail=1
+ compare_ exp-err err || fail=1
+
+ # These options are allowed otherwise
+ sed "s/a/b/$opt" </dev/null || fail=1
+
+ # POSIXLY_CORRECT alone does not disable them
+ POSIXLY_CORRECT=y sed "s/a/b/$opt" </dev/null || fail=1
+done
+
+
+# test s//e (execute pattern-space as shell)
+printf "A\n" > in1 || framework_failure_
+
+printf "hello\n" >exp-gnu-e || framework_failure_
+sed 's/./printf hello/e' in1 > out-gnu-e || fail=1
+compare exp-gnu-e out-gnu-e || fail=1
+
+
+# s///e rejected in POSIX mode
+cat <<\EOF >exp-err-psx-e || framework_failure_
+sed: -e expression #1, char 10: unknown option to `s'
+EOF
+returns_ 1 sed --posix 's/./echo/e' in1 2>err-posix-e || fail=1
+compare_ exp-err-psx-e err-posix-e || fail=1
+
+
+# substitution special commands (e.g \l \L \U \u \E).
+# see compile.c:setup_replacement()
+printf "a\n" > exp-gnu || framework_failure_
+printf "lA\n" > exp-posix || framework_failure_
+
+# gnu-extension: turn the next character to lowercase
+sed 's/./\l&/' in1 > out-gnu || fail=1
+compare_ exp-gnu out-gnu || fail=1
+
+# posix: '\l' is just 'l'
+sed --posix 's/./\l&/' in1 > out-posix || fail=1
+compare_ exp-posix out-posix || fail=1
+
+
+Exit $fail
diff --git a/testsuite/range-overlap.sh b/testsuite/range-overlap.sh
new file mode 100755
index 0000000..267eb03
--- /dev/null
+++ b/testsuite/range-overlap.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Verify that even with overlapping ranges of line numbers,
+# only the selected lines are affected.
+
+# Copyright (C) 2015-2016 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
+
+printf '%s\n' 1 2 3 4 5 6 > in || framework_failure_
+printf '%s\n' 1 5 6 > exp || framework_failure_
+
+# Before sed-4.3, this would mistakenly modify line 5 like this:
+# 1
+# yx5
+# 6
+sed '2,4d;2,3s/^/x/;3,4s/^/y/' in > out 2> err || framework_failure_
+
+fail=0
+compare exp out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/recursive-escape-c.sh b/testsuite/recursive-escape-c.sh
new file mode 100644
index 0000000..88c9399
--- /dev/null
+++ b/testsuite/recursive-escape-c.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+# test \c escaping
+
+# Copyright (C) 2016 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
+
+fail=0
+unset POSIXLY_CORRECT
+export LC_ALL=C
+
+# input file, any 6 lines would do, each a different test case
+printf "%s\n" a a a a a a >in1 || framework_failure_
+
+# input program
+cat << \EOF > prog1 || framework_failure_
+1s/./\cA/
+2s/./\cB/
+3s/./\c[/
+4s/./\c]/
+
+# '\c' at end-of-buffer, a backslash is pushed up
+# on level of interpretation, and the '.' match is replaced
+# with one backslash.
+5s/./\c/
+
+# This would return incorrect results before 4.3,
+# producing both \034 and another backslash.
+6s/./\c\\/
+EOF
+
+# expected output:
+printf '\001\n\002\n\033\n\035\n\\\n\034\n' > exp1 || framework_failure_
+
+#
+# Run simple test cases
+#
+sed -f prog1 in1 > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# for easier troubleshooting, if users ever report errors
+if test "$fail" -eq 1 ; then
+ od -tx1c prog1
+ od -tx1c exp1
+ od -tx1c out1
+fi
+
+#
+# Test invalid usage
+#
+cat << \EOF > exp-err || framework_failure_
+sed: -e expression #1, char 10: recursive escaping after \c not allowed
+EOF
+
+# Before sed-4.3, this resulted in '\034d'. Now, it is rejected.
+returns_ 1 sed '1s/./\c\d/' in1 2>err || fail=1
+compare_ exp-err err || fail=1
+
+Exit $fail
diff --git a/testsuite/regex-errors.sh b/testsuite/regex-errors.sh
new file mode 100644
index 0000000..292b2b3
--- /dev/null
+++ b/testsuite/regex-errors.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Exercise regex_compile errors
+
+# Copyright (C) 2016 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
+
+#
+# Invalid backref in address regex
+#
+cat <<\EOF >exp-err-inv-backref || framework_failure_
+sed: -e expression #1, char 4: Invalid back reference
+EOF
+
+returns_ 1 sed '/\1/,$p' </dev/null 2>err-inv-backref || fail=1
+compare_ exp-err-inv-backref err-inv-backref || fail=1
+
+
+#
+# modifiers on empty regex (BAD_MODIF in regex.c)
+#
+cat <<\EOF >exp-err-bad-modif || framework_failure_
+sed: -e expression #1, char 3: cannot specify modifiers on empty regexp
+EOF
+
+returns_ 1 sed '//M,$p' </dev/null 2>err-bad-modif || fail=1
+compare_ exp-err-bad-modif err-bad-modif || fail=1
+
+
+Exit $fail
diff --git a/testsuite/runptests.c b/testsuite/runptests.c
index cbe61cc..fb787e7 100644
--- a/testsuite/runptests.c
+++ b/testsuite/runptests.c
@@ -1,5 +1,5 @@
/* POSIX regex testsuite from IEEE 2003.2.
- Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#include <regex.h>
diff --git a/testsuite/runtest b/testsuite/runtest
index 80ce903..60f53ef 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -1,23 +1,25 @@
#! /bin/sh
+# The test harness, used invoked through LOG_COMPILER
+# in testsuite/local.mk .
+# Current directory is '$top_builddir'.
+
: ${MAKE=make}
: ${srcdir=.}
-: ${SED="../sed/sed"}
+: ${SED="./sed/sed"}
+
+makefile="${abs_top_srcdir}/testsuite/Makefile.tests"
-makefile="$srcdir/Makefile.tests"
+# Strip the directory './testsuite/' from the test name.
test=`echo "$@"| sed 's,.*/,,'`
-# As a convenience, suppress the output of make if the test passes
-if $MAKE SED="$SED" srcdir="$srcdir" -f "$makefile" $test > $test.test 2>&1; then
- exitcode=0
- rm -f $test.test
-else
- exitcode=$?
-fi
-if test -f $test.skip; then
- exitcode=77
-else
- test -f $test.test && cat $test.test
-fi
-rm -f $test.test $test.skip
+# Skip the utility programs, they are not standalone tests
+test "$test" = get-mb-cur-max \
+ || test "$test" = test-mbrtowc \
+ && exit 77
+
+exitcode=0
+$MAKE SED="$SED" srcdir="$srcdir/testsuite" -f "$makefile" $test || exitcode=$?
+test -f $test.skip && exitcode=77
+rm -f $test.skip
exit $exitcode
diff --git a/testsuite/runtests.c b/testsuite/runtests.c
index 2f62315..3db7a77 100644
--- a/testsuite/runtests.c
+++ b/testsuite/runtests.c
@@ -22,11 +22,7 @@ PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#include <regex.h>
@@ -34,8 +30,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h>
#include <string.h>
-
-
struct a_test
{
int expected;
diff --git a/testsuite/sandbox.sh b/testsuite/sandbox.sh
new file mode 100755
index 0000000..3e529fe
--- /dev/null
+++ b/testsuite/sandbox.sh
@@ -0,0 +1,92 @@
+#!/bin/sh
+# Test --sandbox mode
+
+# Copyright (C) 2016 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
+
+echo a > a || framework_failure_
+echo b > b || framework_failure_
+
+# Same error message, different character position in the sed program.
+for i in 1 6 14 ; do
+ err="sed: -e expression #1, char $i: e/r/w commands disabled in sandbox mode"
+ echo "$err" > exp-err$i || framework_failure_
+done
+
+fail=0
+
+# read command - without sandbox
+printf "a\nb\n" > exp || framework_failure_
+sed rb a > out || fail=1
+compare exp out || fail=1
+
+# read command - with sandbox
+returns_ 1 sed --sandbox -e 'ra' b >/dev/null 2>err1 || fail=1
+compare exp-err1 err1 || fail=1
+
+
+# write command (create file 'c') - without sandbox
+sed wc a > out || fail=1
+compare a c || fail=1
+compare out a || fail=1
+
+# write command - with sandbox
+returns_ 1 sed --sandbox -e 'wd' a >/dev/null 2>err2 || fail=1
+compare exp-err1 err1 || fail=1
+# ensure file 'd' was not created
+test -e d && fail=1
+
+
+
+# execute command - without sandbox
+sed 'etouch e' b > out || fail=1
+compare b out || fail=1
+# ensure 'e' was created
+test -e e || fail=1
+
+# execute command - with sandbox
+returns_ 1 sed --sandbox -e 'etouch f' b >/dev/null 2>err3 || fail=1
+compare exp-err1 err3 || fail=1
+# ensure 'f' was not created
+test -e f && fail=1
+
+
+
+# substitute+write option - without sandbox
+sed 's/^//wg' a > out || fail=1
+test -e g || fail=1
+
+# substitute+write option - with sandbox
+returns_ 1 sed --sandbox 's/^//wh' a >/dev/null 2>err4 || fail=1
+compare exp-err6 err4 || fail=1
+# ensure file 'h' was not created
+test -e h && fail=1
+
+
+
+# substitute+execute option - without sandbox
+sed 's/.*/touch i/e' a > out || fail=1
+test -e i || fail=1
+
+# substitute+execute option - with sandbox
+returns_ 1 sed --sandbox 's/.*/touch j/e' a >/dev/null 2>err5 || fail=1
+compare exp-err14 err5 || fail=1
+# ensure file 'j' was not created
+test -e j && fail=1
+
+
+Exit $fail
diff --git a/testsuite/stdin-prog.sh b/testsuite/stdin-prog.sh
new file mode 100644
index 0000000..a8f992c
--- /dev/null
+++ b/testsuite/stdin-prog.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Test program file from STDIN
+
+# Copyright (C) 2016 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
+
+fail=0
+
+echo X > in1 || framework_failure_
+printf "1\nX\n" > exp1 || framework_failure_
+
+# program filename starts with '-'
+printf "=\n" > ./-myprog || framework_failure_
+
+
+# program from STDIN
+printf "=\n" | sed -f - in1 > out1 || fail=1
+compare_ exp1 out1 || fail=1
+
+# program filename starting with '-'
+# (if a buggy sed reads from STDIN, the 'v9' command will fail)
+printf "v9\n" | sed -f -myprog in1 > out2 || fail=1
+compare_ exp1 out2 || fail=1
+
+Exit $fail
diff --git a/testsuite/subst-mb-incomplete.sh b/testsuite/subst-mb-incomplete.sh
new file mode 100755
index 0000000..90d73cf
--- /dev/null
+++ b/testsuite/subst-mb-incomplete.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Ensure that sed no longer writes beyond the end of a heap buffer when
+# performing a substitution with a replacement string containing an
+# incomplete multi-byte character.
+
+# Copyright (C) 2015-2016 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_en_utf8_locale_
+
+echo > in || framework_failure_
+printf '\233\375\200\n' > exp-out || framework_failure_
+
+fail=0
+LC_ALL=en_US.utf8 sed $(printf 's/^/\\L\233\375\\\200/') in > out 2> err
+
+compare exp-out out || fail=1
+compare /dev/null err || fail=1
+
+Exit $fail
diff --git a/testsuite/subst-options.sh b/testsuite/subst-options.sh
new file mode 100644
index 0000000..b05eb1b
--- /dev/null
+++ b/testsuite/subst-options.sh
@@ -0,0 +1,125 @@
+#!/bin/sh
+# Test Substitute options (for code-coverage purposes as well)
+
+# Copyright (C) 2016 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
+
+fail=0
+
+#
+# Simple modifiers to s//
+# (specific characters included as make_subst_opts's implementation
+# checks for them before returning control)
+printf "%s\n" a a a a a a > subst-in1 || framework_failure_
+printf "%s\n" x x x x x x > subst-exp1 || framework_failure_
+cat << \EOF >> subst-prog1 || framework_failure_
+1s/A/x/i
+2s/A/x/I
+
+# s// followed by '}'
+3{s/./x/}
+# s// followed by '#'
+4s/./x/#
+# s// followed by ';'
+5s/./x/;
+# s// followed by '\n
+6s/./x/
+EOF
+
+sed -f subst-prog1 subst-in1 > subst-out1 || fail=1
+compare_ subst-exp1 subst-out1 || fail=1
+
+
+#
+# Number modifiers to s//
+#
+
+cat << \EOF >subst-in2 || framework_failure_
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+bbbbbbbbbb
+EOF
+
+cat << \EOF >subst-prog2 || framework_failure_
+1s/./x/g
+2s/./x/1
+3s/./x/2
+4s/./x/3
+5s/./x/4
+6s/./x/5
+7s/./x/6
+8s/./x/7
+9s/./x/8
+10s/./x/9
+EOF
+
+cat << \EOF >subst-exp2
+xxxxxxxxxx
+xbbbbbbbbb
+bxbbbbbbbb
+bbxbbbbbbb
+bbbxbbbbbb
+bbbbxbbbbb
+bbbbbxbbbb
+bbbbbbxbbb
+bbbbbbbxbb
+bbbbbbbbxb
+EOF
+
+sed -f subst-prog2 subst-in2 > subst-out2 || fail=1
+compare_ subst-exp2 subst-out2 || fail=1
+
+#
+# Multiline modifier: s///m
+# ('N' will read and concatenate the second line
+# into the patten space, making it "foo\nbar".
+# s// will then operate on it as one string).
+printf "foo\nbar\n" > subst-in3 || fail=1
+printf "Xoo\nXar\n" > subst-exp3 || fail=1
+
+sed 'N;s/^./X/gm' subst-in3 > subst-out3-1 || fail=1
+compare_ subst-exp3 subst-out3-1 || fail=1
+sed 'N;s/^./X/gM' subst-in3 > subst-out3-2 || fail=1
+compare_ subst-exp3 subst-out3-2 || fail=1
+
+# sanity-check: without m, only the first line should match
+printf "Xoo\nbar\n" > subst-exp3-3 || fail=1
+sed 'N;s/^./X/g' subst-in3 > subst-out3-3 || fail=1
+compare_ subst-exp3-3 subst-out3-3 || fail=1
+
+
+#
+# s// followed by \r\n
+#
+
+printf "s/./X/\r\n" > subst-prog4 || framework_failure_
+echo a > subst-in4 || framework_failure_
+echo X > subst-exp4 || framework_failure_
+sed -f subst-prog4 subst-in4 > subst-out4 || fail=1
+compare_ subst-exp4 subst-out4 || fail=1
+
+
+
+
+Exit $fail
diff --git a/testsuite/subst-replacement.sh b/testsuite/subst-replacement.sh
new file mode 100644
index 0000000..c385be3
--- /dev/null
+++ b/testsuite/subst-replacement.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+# Test Substitute replacements, e.g. 's/(.)/\U\1/'
+
+# Copyright (C) 2016 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
+
+fail=0
+
+#
+# Backslash followed by unrecognized letter,
+# use letter as-is.
+echo a > in-rpl1 || framework_failure_
+echo Q > exp-rpl1 || framework_failure_
+sed -E 's/(.)/\Q/' in-rpl1 > out-rpl1 || fail=1
+compare_ exp-rpl1 out-rpl1 || fail=1
+
+#
+# numbered backreferences
+#
+echo 123456789 > in-rpl2 || framework_failure_
+for i in 1 2 3 4 5 6 7 8 9 ;
+do
+ echo $i > exp-rpl2-$i || framework_failure_
+ sed -E "s/(.)(.)(.)(.)(.)(.)(.)(.)(.)/\\$i/" in-rpl2 > out-rpl2-$i || fail=1
+ compare_ exp-rpl2-$i out-rpl2-$i || fail=1
+done
+
+# \0 matches entire pattern (TODO: is this documented?)
+# output should be the same as the input.
+sed -E 's/(.)(.)(.)(.)(.)(.)(.)(.)(.)/\0/' in-rpl2 > out-rpl2-0 || fail=1
+compare_ in-rpl2 out-rpl2-0 || fail=1
+
+# Unescaped '&' matches entire pattern
+# output should be the same as the input.
+sed -E 's/(.)(.)(.)(.)(.)(.)(.)(.)(.)/&/' in-rpl2 > out-rpl2-amp || fail=1
+compare_ in-rpl2 out-rpl2-amp || fail=1
+
+
+#
+# gnu extension: \U \u \L \l \E
+#
+echo abCde > in-rpl3 || framework_failure_
+
+# \U - all uppercase
+echo ABCde > exp-rpl3-U || framework_failure_
+sed -E 's/(.)(.)(.)/\U\1\2\3/' in-rpl3 > out-rpl3-U || fail=1
+compare_ exp-rpl3-U out-rpl3-U || fail=1
+
+# \u - next-char uppercase
+echo AbCde > exp-rpl3-u || framework_failure_
+sed -E 's/(.)(.)(.)/\u\1\2\3/' in-rpl3 > out-rpl3-u || fail=1
+compare_ exp-rpl3-u out-rpl3-u || fail=1
+
+# \L - all lowercase
+echo abcde > exp-rpl3-L || framework_failure_
+sed -E 's/(.)(.)(.)/\L\1\2\3/' in-rpl3 > out-rpl3-L || fail=1
+compare_ exp-rpl3-L out-rpl3-L || fail=1
+
+# \l - next-char lowercase
+echo abCde > exp-rpl3-l || framework_failure_
+sed -E 's/(.)(.)(.)/\l\1\2\3/' in-rpl3 > out-rpl3-l || fail=1
+compare_ exp-rpl3-l out-rpl3-l || fail=1
+
+# \E - stop \U \u \L \l processing
+echo AbCde > exp-rpl3-E1 || framework_failure_
+sed -E 's/(.)(.)(.)/\U\1\E\2\3/' in-rpl3 > out-rpl3-E1 || fail=1
+compare_ exp-rpl3-E1 out-rpl3-E1 || fail=1
+
+echo abCde > exp-rpl3-E2 || framework_failure_
+sed -E 's/(.)(.)(.)/\L\1\2\E\3/' in-rpl3 > out-rpl3-E2 || fail=1
+compare_ exp-rpl3-E2 out-rpl3-E2 || fail=1
+
+
+Exit $fail
diff --git a/testsuite/temp-file-cleanup.sh b/testsuite/temp-file-cleanup.sh
new file mode 100755
index 0000000..aadb9ce
--- /dev/null
+++ b/testsuite/temp-file-cleanup.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Verify that an erroneous use of sed -i no longer leaves behind
+# a temporary file.
+
+# Copyright (C) 2015-2016 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
+
+# The input file must have at least one line.
+echo > in || framework_failure_
+printf 'sed: -e expression #1, char 0: no previous regular expression\n' \
+ > exp || framework_failure_
+
+# Before sed-4.3, this would create a file named sed??????
+returns_ 1 sed -i s//b/ in > out 2> err || fail=1
+
+compare /dev/null out || fail=1
+compare exp err || fail=1
+
+# Ensure that no other file has been created in this directory.
+files=$(echo *)
+test "$files" = "err exp in out" || fail=1
+
+Exit $fail
diff --git a/testsuite/test-mbrtowc.c b/testsuite/test-mbrtowc.c
new file mode 100644
index 0000000..04c20fc
--- /dev/null
+++ b/testsuite/test-mbrtowc.c
@@ -0,0 +1,172 @@
+/* Auxiliary program to test mbrtowc(3) behaviour.
+ Copyright 2016 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, 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Test the operating-system's native mbrtowc(3) function,
+ by feeding it multibyte seqeunces one byte at a time,
+ and reporting the result.
+
+ The program prints the following values after each mbrtowc invocation,
+ separated by commas:
+
+ -2 the octet is contributes to a valid yet incomplete multibyte sequence
+ in the current locale.
+
+ -1 the octet causes an encoding error.
+
+ 0 the octet represents a NUL byte
+
+ 1 the octet is a valid single-byte character, OR
+ completes a valid multibyte sequence.
+
+ Because the program invokes mbrtowc(3) byte-by-byte, the reported
+ result should never be larger than 1.
+
+ Example of typical output with UTF-8 encoding
+ ---------------------------------------------
+
+ The unicode character 'N-ARY SUMMATION' (U+2211), encoded in UTF-8 as:
+ hex: 0xE2 0x88 0x91
+ oct: 342 210 211
+
+ Decoding the valid sequence byte-by-byte gives:
+ $ printf '\342\210\221' | LC_ALL=en_US.UTF-8 test-mbrtowc
+ -2,-2,1
+
+ '\210' is not a valid leading byte in UTF-8,
+ thus the first byte gives -1, and the 'X' is treated
+ as a valid single-byte character:
+
+ $ printf '\210X' | LC_ALL=en_US.UTF-8 test-mbrtowc
+ -1,1
+
+ '\342' is a valid yet incomplete multibyte sequence.
+ Passing it to mbrtowc results in value '-2'.
+ The following value 'X' gives an encoding error '-1'
+ (as 'X' is not a valid trailing byte in a multibyte UTF-8 sequence):
+
+ $ printf '\342X' | LC_ALL=en_US.UTF-8 test-mbrtowc
+ -2,-1
+
+
+ Detecting implementation bugs in mbrtowc
+ ----------------------------------------
+
+ UTF-8 implementation is correct on most operating systems.
+ Other multibyte locales might present more difficulties.
+ An example is the Japanese SHIFT-JIS locale under Mac OS X.
+ NOTE: The locale is 'ja_JP.SJIS' under Mac OS X, 'ja_JP.shiftjis'
+ under Ubuntu. 'ja_JP.sjis' was also found on some systems.
+
+ Using unicode character 'KATAKANA LETTER ZE' (U+30BC)
+ UTF-8: hex: 0xE3 0x82 0xBC
+ Shift-jis hex: 0x83 0x5B
+ oct: 203 133
+
+ The following is a valid multibyte sequence in SHIFT-JIS,
+ the first byte should result in '-2' (valid yet incomplete),
+ and the second byte should result in '1' (a valid multibyte sequence
+ completed):
+
+ $ printf '\203\133' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,1
+
+ The follwing is an INVALID multibyte sequence in SHIFT-JIS
+ (The byte ':' is not valid as a second octet).
+ Buggy implementations will accept this as a valid multibyte sequence:
+
+ # NOTE: this result indicates a buggy mbrtowc
+ $ printf '\203:' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,1
+
+ A correct implementations should report '-1' for the second byte (i.e.
+ an encoding error):
+
+ $ printf '\203:' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,-1
+
+
+ Expected results with correct implementations
+ ---------------------------------------------
+
+ In GNU Sed some tests purposely use invalid multibyte sequences
+ to test sed's behaviour. A buggy implemetation of mbrtowc
+ would result in false-alarm failures.
+
+ The following are expected results in correct implementations:
+ (locale names are from Mac OS X):
+
+ $ printf '\203\133' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,1
+ $ printf '\203:' | LC_ALL=ja_JP.SJIS test-mbrtowc
+ -2,-1
+ $ printf '\262C' | LC_ALL=ja_JP.eucJP test-mbrtowc
+ -2,-1
+*/
+
+#include <config.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+
+#include "closeout.h"
+#include "error.h"
+#include "progname.h"
+
+/* stub replacement for non-standard err(3) */
+static int
+die (const char *msg)
+{
+ error (0, 0, "%s: error: %s\n", program_name, msg);
+ exit (EXIT_FAILURE);
+}
+
+int
+main (int argc, char **argv)
+{
+ int c;
+ int first = 1;
+
+ set_program_name (argv[0]);
+ if (!setlocale (LC_ALL, ""))
+ die ("failed to set locale");
+
+ while ((c = getchar ()) != EOF)
+ {
+ wchar_t wc;
+ char ch = (unsigned char) c;
+ int i = (int) mbrtowc (&wc, &ch, 1, NULL);
+
+ if (!first)
+ putchar (',');
+ first = 0;
+
+ printf ("%d", i);
+ }
+
+ if (first)
+ die ("empty input");
+
+ putchar ('\n');
+
+ if (ferror (stdin))
+ die ("read error");
+ close_stdout ();
+
+ exit (EXIT_SUCCESS);
+}
diff --git a/testsuite/title-case.sh b/testsuite/title-case.sh
new file mode 100755
index 0000000..962929b
--- /dev/null
+++ b/testsuite/title-case.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test case insensitive matching for titlecase and similarly odd chars.
+
+# Copyright (C) 2016 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_el_iso88597_locale_
+
+fail=0
+
+a='\323' # SIGMA
+b='\362' # stigma
+c='\363' # sigma
+
+printf "$a\\n$b\\n$c\\n" >in || framework_failure_
+for chr in "$a" "$b" "$c"; do
+ printf '/\(\)\\1'"$chr"/Ip >prog || fail=1
+ LC_ALL=el_GR.iso88597 sed -n -f prog in >out || fail=1
+ compare_ in out || fail=1
+done
+
+Exit $fail
diff --git a/testsuite/tst-boost.c b/testsuite/tst-boost.c
index b38a620..6265123 100644
--- a/testsuite/tst-boost.c
+++ b/testsuite/tst-boost.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/tst-pcre.c b/testsuite/tst-pcre.c
index e8c6a0b..eb16424 100644
--- a/testsuite/tst-pcre.c
+++ b/testsuite/tst-pcre.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
@@ -141,7 +139,7 @@ main (int argc, char **argv)
{
regex_t re;
int n;
-
+
if (!pattern_valid)
{
printf ("%lu: No previous valid pattern %s\n", linenum, line);
diff --git a/testsuite/tst-regex2.c b/testsuite/tst-regex2.c
index 1dc14ad..dd65bb3 100644
--- a/testsuite/tst-regex2.c
+++ b/testsuite/tst-regex2.c
@@ -1,6 +1,4 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/testsuite/tst-rxspencer.c b/testsuite/tst-rxspencer.c
index 758fc04..0c060a4 100644
--- a/testsuite/tst-rxspencer.c
+++ b/testsuite/tst-rxspencer.c
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -18,9 +18,7 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
@@ -340,7 +338,7 @@ mb_test (const char *pattern, int cflags, const char *string, int eflags,
free (matches_mb);
free (expect_mb);
if (string_mb != string)
- free ((char *) string_mb);
+ free (string_mb);
free (pattern_mb);
return ret;
}
diff --git a/testsuite/unbuffered.sh b/testsuite/unbuffered.sh
new file mode 100644
index 0000000..b1a4c1b
--- /dev/null
+++ b/testsuite/unbuffered.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Test -u/--unbuffered option
+
+# Copyright (C) 2016 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
+
+printf "1\n2\n" > in1 || framework_failure_
+
+# expected output for both programs
+printf "1\n" >> exp || framework_failure_
+
+
+# in unbuffered mode,
+# sed should consume and print the first line,
+# wc should see the rest of the input (second line).
+# The second sed trims optional leading whitespace.
+( sed -u 1q > out-sed ; wc -l | sed 's/^ *//' > out-wc ) < in1
+
+compare_ exp out-sed || fail=1
+compare_ exp out-wc || fail=1
+
+
+Exit $fail
diff --git a/testsuite/uniq.good b/testsuite/uniq.good
index 2941bec..95fc5ee 100644
--- a/testsuite/uniq.good
+++ b/testsuite/uniq.good
@@ -515,7 +515,7 @@ if (min > 0)
if (min > md->end_subject - eptr)
if (minimize)
if (number > 0)
-if (number > EXTRACT_BASIC_MAX)
+if (number > EXTRACT_BASIC_MAX)
if (offset < md->offset_max)
if (offset >= md->offset_max)
if (offset_top <= offset)
diff --git a/testsuite/uniq.inp b/testsuite/uniq.inp
index b1eddf3..aa61062 100644
--- a/testsuite/uniq.inp
+++ b/testsuite/uniq.inp
@@ -1240,8 +1240,8 @@ if (minimize)
if (minimize)
if (minimize)
if (number > 0)
-if (number > EXTRACT_BASIC_MAX)
-if (number > EXTRACT_BASIC_MAX)
+if (number > EXTRACT_BASIC_MAX)
+if (number > EXTRACT_BASIC_MAX)
if (offset < md->offset_max)
if (offset >= md->offset_max)
if (offset_top <= offset)
diff --git a/testsuite/utf8-1.good b/testsuite/utf8-1.good
index a48dac8..4e15f90 100644
--- a/testsuite/utf8-1.good
+++ b/testsuite/utf8-1.good
@@ -1 +1 @@
-Да Д \ No newline at end of file
+Да Д
diff --git a/testsuite/utf8-1.inp b/testsuite/utf8-1.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-1.inp
+++ b/testsuite/utf8-1.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-2.good b/testsuite/utf8-2.good
index a48dac8..4e15f90 100644
--- a/testsuite/utf8-2.good
+++ b/testsuite/utf8-2.good
@@ -1 +1 @@
-Да Д \ No newline at end of file
+Да Д
diff --git a/testsuite/utf8-2.inp b/testsuite/utf8-2.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-2.inp
+++ b/testsuite/utf8-2.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-3.good b/testsuite/utf8-3.good
index 4b90af9..3f39372 100644
--- a/testsuite/utf8-3.good
+++ b/testsuite/utf8-3.good
@@ -1 +1 @@
-Да д \ No newline at end of file
+Да д
diff --git a/testsuite/utf8-3.inp b/testsuite/utf8-3.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-3.inp
+++ b/testsuite/utf8-3.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/utf8-4.good b/testsuite/utf8-4.good
index 760353b..ddaa4b6 100644
--- a/testsuite/utf8-4.good
+++ b/testsuite/utf8-4.good
@@ -1 +1 @@
-ДА Д \ No newline at end of file
+ДА Д
diff --git a/testsuite/utf8-4.inp b/testsuite/utf8-4.inp
index 6e84e16..a596b7f 100644
--- a/testsuite/utf8-4.inp
+++ b/testsuite/utf8-4.inp
@@ -1 +1 @@
-да д \ No newline at end of file
+да д
diff --git a/testsuite/version.gin b/testsuite/version.gin
deleted file mode 100644
index 4b9d3fc..0000000
--- a/testsuite/version.gin
+++ /dev/null
@@ -1,12 +0,0 @@
-../sed/sed (GNU sed) @VERSION@
-Copyright (C) @COPYRIGHT_YEAR@ Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Written by Jay Fenlason, Tom Lord, Ken Pizzini,
-and Paolo Bonzini.
-GNU sed home page: <http://www.gnu.org/software/sed/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>.
-E-mail bug reports to: <@PACKAGE_BUGREPORT@>.
-Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
diff --git a/testsuite/xbxcx.good b/testsuite/xbxcx.good
index 9eadcd0..1a2eece 100644
--- a/testsuite/xbxcx.good
+++ b/testsuite/xbxcx.good
@@ -4,4 +4,4 @@ xbxcx
xbxcx
xbxcx
xbxcx
-xbxcx \ No newline at end of file
+xbxcx
diff --git a/testsuite/xbxcx.inp b/testsuite/xbxcx.inp
index 792d120..cac4334 100644
--- a/testsuite/xbxcx.inp
+++ b/testsuite/xbxcx.inp
@@ -4,4 +4,4 @@ bc
bac
baac
baaac
-baaaac \ No newline at end of file
+baaaac
diff --git a/testsuite/xemacs.good b/testsuite/xemacs.good
index 9fce4f1..4480027 100644
--- a/testsuite/xemacs.good
+++ b/testsuite/xemacs.good
@@ -1,7 +1,6 @@
#Makefile.in generated automatically by automake 1.5 from Makefile.am.
-#Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#Free Software Foundation, Inc.
+#Copyright 1994-2016 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.
@@ -64,4 +63,4 @@
"$(ACLOCAL_M4): configure.ac m4/codeset.m4 m4/getline.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/obstack.m4 m4/progtest.m4"
" cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)"
-"config.h: stamp-h" \ No newline at end of file
+"config.h: stamp-h"
diff --git a/testsuite/xemacs.inp b/testsuite/xemacs.inp
index 0fc0414..6beacff 100644
--- a/testsuite/xemacs.inp
+++ b/testsuite/xemacs.inp
@@ -1,7 +1,6 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright 1994-2016 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.
@@ -64,4 +63,4 @@ $(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENC
$(ACLOCAL_M4): configure.ac m4/codeset.m4 m4/getline.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/obstack.m4 m4/progtest.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-config.h: stamp-h \ No newline at end of file
+config.h: stamp-h
diff --git a/testsuite/y-bracket.good b/testsuite/y-bracket.good
index 278fee9..7e1a0ac 100644
--- a/testsuite/y-bracket.good
+++ b/testsuite/y-bracket.good
@@ -1 +1 @@
-Are you sure (y/n)? y]
+Are you sure (y/n)? y]
diff --git a/testsuite/y-bracket.inp b/testsuite/y-bracket.inp
index fe6124f..131c38c 100644
--- a/testsuite/y-bracket.inp
+++ b/testsuite/y-bracket.inp
@@ -1 +1 @@
-Are you sure (y/n)? [y]
+Are you sure (y/n)? [y]
diff --git a/testsuite/y-newline.good b/testsuite/y-newline.good
index b0f2bfe..371b9cb 100644
--- a/testsuite/y-newline.good
+++ b/testsuite/y-newline.good
@@ -1 +1 @@
-Are Sou Yure (S/n)? [S] $$Are Sou Yure (S/n)? [S]
+Are Sou Yure (S/n)? [S]$$Are Sou Yure (S/n)? [S]
diff --git a/testsuite/y-newline.inp b/testsuite/y-newline.inp
index fe6124f..131c38c 100644
--- a/testsuite/y-newline.inp
+++ b/testsuite/y-newline.inp
@@ -1 +1 @@
-Are you sure (y/n)? [y]
+Are you sure (y/n)? [y]
diff --git a/testsuite/y-zero.good b/testsuite/y-zero.good
new file mode 100644
index 0000000..659b724
--- /dev/null
+++ b/testsuite/y-zero.good
Binary files differ
diff --git a/testsuite/y-zero.inp b/testsuite/y-zero.inp
new file mode 100644
index 0000000..8baef1b
--- /dev/null
+++ b/testsuite/y-zero.inp
@@ -0,0 +1 @@
+abc
diff --git a/testsuite/y-zero.sed b/testsuite/y-zero.sed
new file mode 100644
index 0000000..6b0af7b
--- /dev/null
+++ b/testsuite/y-zero.sed
@@ -0,0 +1 @@
+y/b/\x00/
diff --git a/testsuite/zero-anchor.good b/testsuite/zero-anchor.good
new file mode 100644
index 0000000..a62d3b4
--- /dev/null
+++ b/testsuite/zero-anchor.good
Binary files differ
diff --git a/testsuite/zero-anchor.inp b/testsuite/zero-anchor.inp
new file mode 100644
index 0000000..7207ec4
--- /dev/null
+++ b/testsuite/zero-anchor.inp
Binary files differ
diff --git a/testsuite/zero-anchor.sed b/testsuite/zero-anchor.sed
new file mode 100644
index 0000000..b3d2de1
--- /dev/null
+++ b/testsuite/zero-anchor.sed
@@ -0,0 +1,6 @@
+N
+N
+s/^/X/g
+s/^/X/mg
+s/$/Y/g
+s/$/Y/mg