tests: convert "8bit" test to new framework
The input (8bit.inp) and expected output (8bit.good) contains non-ascii octets, and are kept as-is. The sed program is converted to newer init.sh-style tests. * testsuite/8bit.sed: Removed. * testsuite/8bit.sh: New test. * testsuite/local.mk (EXTRA_DIST): Remove 8bit.sed. (SEDTEST) Remove 8bit.sed. (T): Add 8bit.sh.
This commit is contained in:
1 parent
96b8cec2aa
commit
4f8c2c8ba2
3 files changed
+60
-23
No files matched your search
@@ -1,21 +0,0 @@
|
||||
# The first poem from the Man'yoshu. I like Hitomaro's poems better
|
||||
# but I couldn't find a copy of any of them in Japanese. This version
|
||||
# of this poem is from 例解古語辞典(第三版)三省堂.
|
||||
#
|
||||
# Speaking of Hitomaro, here is the english translation of one of my
|
||||
# favorites. I just know that everyone reading these test cases wants
|
||||
# to see this.
|
||||
#
|
||||
# In the autumn mountains
|
||||
# The yellow leaves are so thick.
|
||||
# Alas, how shall I seek my love
|
||||
# Who has wandered away?
|
||||
#
|
||||
# I see the messenger come
|
||||
# As the yellow leaves are falling.
|
||||
# Oh, well I remember
|
||||
# How on such a day we used to meet--
|
||||
# My lover and I!
|
||||
# -- Kakinomoto Hitomaro
|
||||
#
|
||||
s/����/����/
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Adapted from sed's old "8bit" test
|
||||
|
||||
# Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
|
||||
print_ver_ sed
|
||||
|
||||
fail=0
|
||||
|
||||
# Original comment from '8bit.sed':
|
||||
|
||||
# The first poem from the Man'yoshu. I like Hitomaro's poems better
|
||||
# but I couldn't find a copy of any of them in Japanese. This version
|
||||
# of this poem is from 例解古語辞典(第三版)三省堂.
|
||||
#
|
||||
# Speaking of Hitomaro, here is the english translation of one of my
|
||||
# favorites. I just know that everyone reading these test cases wants
|
||||
# to see this.
|
||||
#
|
||||
# In the autumn mountains
|
||||
# The yellow leaves are so thick.
|
||||
# Alas, how shall I seek my love
|
||||
# Who has wandered away?
|
||||
#
|
||||
# I see the messenger come
|
||||
# As the yellow leaves are falling.
|
||||
# Oh, well I remember
|
||||
# How on such a day we used to meet--
|
||||
# My lover and I!
|
||||
# -- Kakinomoto Hitomaro
|
||||
|
||||
# The program is:
|
||||
# s/����/����/
|
||||
printf "s/\302\347\317\302/\306\374\313\334/\n" > 8bit-prog.sed \
|
||||
|| framework_failure_
|
||||
|
||||
|
||||
sed -f 8bit-prog.sed < "$abs_top_srcdir/testsuite/8bit.inp" > out || fail=1
|
||||
remove_cr_inplace out
|
||||
compare "$abs_top_srcdir/testsuite/8bit.good" out || fail=1
|
||||
|
||||
|
||||
Exit $fail
|
||||
+3
-2
@@ -84,6 +84,8 @@ T += testsuite/follow-symlinks.sh \
|
||||
testsuite/follow-symlinks-stdin.sh
|
||||
endif
|
||||
|
||||
# Old tests converted to newer init.sh style
|
||||
T += testsuite/8bit.sh
|
||||
|
||||
|
||||
TESTS = $(check_PROGRAMS) $(SEDTESTS) $(T)
|
||||
@@ -106,7 +108,7 @@ check_PROGRAMS += testsuite/bug-regex7 \
|
||||
testsuite/runptests testsuite/tst-rxspencer testsuite/tst-regex2
|
||||
endif
|
||||
|
||||
SEDTESTS += testsuite/8bit testsuite/newjis \
|
||||
SEDTESTS += testsuite/newjis \
|
||||
testsuite/noeolw \
|
||||
testsuite/madding testsuite/mac-mf \
|
||||
testsuite/xemacs \
|
||||
@@ -185,7 +187,6 @@ EXTRA_DIST += \
|
||||
testsuite/runtest testsuite/Makefile.tests \
|
||||
testsuite/8bit.good \
|
||||
testsuite/8bit.inp \
|
||||
testsuite/8bit.sed \
|
||||
testsuite/8to7.good \
|
||||
testsuite/8to7.inp \
|
||||
testsuite/8to7.sed \
|
||||
|
||||
Reference in new issue
Block a user