diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:16:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:16:24 +0000 |
commit | 9221dca64f0c8b5de72727491e41cf63e902eaab (patch) | |
tree | d8cbbf520eb4b5c656a54b2e36947008dcb751ad /src/tests/manconv-1 | |
parent | Initial commit. (diff) | |
download | man-db-9221dca64f0c8b5de72727491e41cf63e902eaab.tar.xz man-db-9221dca64f0c8b5de72727491e41cf63e902eaab.zip |
Adding upstream version 2.8.5.upstream/2.8.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/manconv-1')
-rwxr-xr-x | src/tests/manconv-1 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/tests/manconv-1 b/src/tests/manconv-1 new file mode 100755 index 0000000..0ada300 --- /dev/null +++ b/src/tests/manconv-1 @@ -0,0 +1,43 @@ +#! /bin/sh + +# Test manconv's support for Emacs-style coding: tags. + +: ${srcdir=.} +. "$srcdir/testlib.sh" + +: ${MANCONV=manconv} + +init + +cat >"$tmpdir/1.exp" <<'EOF' +'\" -*- coding: ISO-8859-1 +á +EOF +iconv -f UTF-8 -t ISO-8859-1 <"$tmpdir/1.exp" >"$tmpdir/1.inp" +run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/1.inp" >"$tmpdir/1.out" +expect_pass 'simple coding tag' 'diff -u "$tmpdir/1.exp" "$tmpdir/1.out"' + +cat >"$tmpdir/2.exp" <<'EOF' +'\" -*- mode: troff; coding: ISO-8859-1 +á +EOF +iconv -f UTF-8 -t ISO-8859-1 <"$tmpdir/2.exp" >"$tmpdir/2.inp" +run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/2.inp" >"$tmpdir/2.out" +expect_pass 'mode and coding tags' 'diff -u "$tmpdir/2.exp" "$tmpdir/2.out"' + +cat >"$tmpdir/3.exp" <<'EOF' +'\" -*- mode: troff; coding: ISO-LATIN-1 +á +EOF +iconv -f UTF-8 -t ISO-8859-1 <"$tmpdir/3.exp" >"$tmpdir/3.inp" +run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/3.inp" >"$tmpdir/3.out" +expect_pass 'iso-latin-1 coding alias' 'diff -u "$tmpdir/3.exp" "$tmpdir/3.out"' + +cat >"$tmpdir/4.inp" <<'EOF' +'\" -*- nroff -*- +EOF +run $MANCONV -f UTF-8 -t UTF-8 <"$tmpdir/4.inp" >"$tmpdir/4.out" +expect_pass 'preprocessor comment but no coding tag' \ + 'diff -u "$tmpdir/4.inp" "$tmpdir/4.out"' + +finish |