summaryrefslogtreecommitdiff
path: root/src/tests/man-recode-in-place
Commit message (Collapse)AuthorAge
* Fix test failures when a working iconv is not availableColin Watson2023-07-20
| | | | | | | | | | | | | | | | Part of https://gitlab.com/man-db/man-db/-/issues/25. * configure.ac: Substitute `HAVE_ICONV`. * src/tests/Makefile.am (TESTS_ENVIRONMENT): Export `HAVE_ICONV`. * src/tests/testlib.sh (report_skip): New function to skip an individual test out of several in a file. (skip): Refactor slightly to call `report_skip`. * src/tests/man-recode-in-place, src/tests/man-recode-suffix, src/tests/manconv-coding-tags, src/tests/manconv-guess-from-encoding, src/tests/manconv-incomplete-char-at-eof, src/tests/manconv-odd-combinations: Skip several tests if `HAVE_ICONV` is not `yes`. * NEWS.md: Document this.
* pre-commit: Avoid need for multiple shellcheck runsColin Watson2022-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | * .shellcheckrc: Set `external-sources=true`. * src/tests/lexgrog-backslash-dash-rhs, src/tests/lexgrog-basic, src/tests/lexgrog-multiple-whatis, src/tests/man-deleted-directory, src/tests/man-exact-section-matches, src/tests/man-executable-page-on-path, src/tests/man-invalid-db-entry, src/tests/man-language-specific-requests, src/tests/man-mandatory-manpath, src/tests/man-missing-locales, src/tests/man-override-dir, src/tests/man-recode-in-place, src/tests/man-recode-suffix, src/tests/man-so-links-same-section, src/tests/man-suffixed-extension, src/tests/man-symlinks-with-matching-names, src/tests/manconv-coding-tags, src/tests/manconv-guess-from-encoding, src/tests/manconv-incomplete-char-at-eof, src/tests/manconv-odd-combinations, src/tests/mandb-basic, src/tests/mandb-bogus-symlink, src/tests/mandb-cachedir-tag, src/tests/mandb-empty-page, src/tests/mandb-purge-updates-timestamp, src/tests/mandb-regular-file-symlink-changes, src/tests/mandb-symlink-beats-whatis-ref, src/tests/mandb-symlink-target-timestamp, src/tests/mandb-whatis-broken-link-changes, src/tests/whatis-path-to-executable, src/tests/zsoelim-so-includes: Add `shellcheck source-path=SCRIPTDIR` directive before sourcing testlib.sh. * .pre-commit-config.yaml: Consolidate the two shellcheck hooks into one.
* tests: Make pass/fail reporting more shellcheck-friendlyColin Watson2022-03-07
| | | | | | | | | | | | | * src/tests/testlib.sh (report): New function, similar to expect_pass but taking an exit code rather than a command string to evaluate. (expect_pass): Remove. (expect_files_equal): Refactor using report function. * src/tests/man-deleted-directory, src/tests/man-executable-page-on-path, src/tests/man-missing-locales, src/tests/man-recode-in-place, src/tests/manconv-incomplete-char-at-eof, src/tests/mandb-bogus-symlink, src/tests/mandb-cachedir-tag, src/tests/mandb-empty-page, src/tests/mandb-purge-updates-timestamp: Refactor to use report function rather than expect_pass.
* tests: Add an expect_files_equal helper functionColin Watson2022-03-07
| | | | | | | | | | | | | | | | | | | | | * src/tests/testlib.sh (expect_files_equal): New function. * src/tests/lexgrog-backslash-dash-rhs, src/tests/lexgrog-basic, src/tests/lexgrog-multiple-whatis, src/tests/man-exact-section-matches, src/tests/man-invalid-db-entry, src/tests/man-language-specific-requests, src/tests/man-mandatory-manpath, src/tests/man-override-dir, src/tests/man-recode-in-place, src/tests/man-recode-suffix, src/tests/man-so-links-same-section, src/tests/man-suffixed-extension, src/tests/man-symlinks-with-matching-names, src/tests/manconv-coding-tags, src/tests/manconv-guess-from-encoding, src/tests/manconv-odd-combinations, src/tests/mandb-basic, src/tests/mandb-purge-updates-timestamp, src/tests/mandb-regular-file-symlink-changes, src/tests/mandb-symlink-beats-whatis-ref, src/tests/mandb-symlink-target-timestamp, src/tests/mandb-whatis-broken-link-changes, src/tests/whatis-path-to-executable, src/tests/zsoelim-so-includes: Use expect_files_equal instead of the equivalent expect_pass construction.
* tests: Improve quotingColin Watson2022-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | * src/tests/lexgrog-backslash-dash-rhs, src/tests/lexgrog-basic, src/tests/lexgrog-multiple-whatis, src/tests/man-deleted-directory, src/tests/man-exact-section-matches, src/tests/man-executable-page-on-path, src/tests/man-invalid-db-entry, src/tests/man-language-specific-requests, src/tests/man-mandatory-manpath, src/tests/man-missing-locales, src/tests/man-override-dir, src/tests/man-recode-in-place, src/tests/man-recode-suffix, src/tests/man-so-links-same-section, src/tests/man-suffixed-extension, src/tests/man-symlinks-with-matching-names, src/tests/manconv-coding-tags, src/tests/manconv-guess-from-encoding, src/tests/manconv-incomplete-char-at-eof, src/tests/manconv-odd-combinations, src/tests/mandb-basic, src/tests/mandb-bogus-symlink, src/tests/mandb-cachedir-tag, src/tests/mandb-empty-page, src/tests/mandb-purge-updates-timestamp, src/tests/mandb-regular-file-symlink-changes, src/tests/mandb-symlink-beats-whatis-ref, src/tests/mandb-symlink-target-timestamp, src/tests/mandb-whatis-broken-link-changes, src/tests/whatis-path-to-executable, src/tests/zsoelim-so-includes: Use ': "${var=default}"' idiom to assign default values rather than ': ${var=default}', pacifying shellcheck.
* Add a new man-recode programColin Watson2019-09-30
This has an interface designed for bulk conversion, and so can be much faster than running "man --recode" on each page. Fixes Debian bug #933576. * bootstrap.conf (gnulib_modules): Add renameat, tempname, and unlinkat. * src/man-recode.c: New file. * src/Makefile.am (bin_PROGRAMS): Add man-recode. (man_recode_LDADD, man_recode_SOURCES): Add. * src/tests/man-recode-in-place, src/tests/man-recode-suffix: New files. * src/tests/Makefile.am (ALL_TESTS): Add man-recode-in-place and man-recode-suffix. * .gitignore: Add src/man-recode. * po/POTFILES.in: Add src/man-recode.c. * m4/man-trans-subst.m4 (MAN_TRANS_SUBST): Adjust to support program names containing dashes. * configure.ac: Add substitutions for man-recode. * man/man1/man-recode.man1: New file. * man/man1/man.man1 (Main modes of operation): Add a note to the description of --recode suggesting man-recode instead. * man/man1/manconv.man1 (SEE ALSO): Add reference to man-recode(1). * man/Makefile.am (man1_MANS): Add man1/man-recode.1. * man/da/Makefile.am (man1_MANS): Likewise. * man/de/Makefile.am (man1_MANS): Likewise. * man/es/Makefile.am (man1_MANS): Likewise. * man/fr/Makefile.am (man1_MANS): Likewise. * man/id/Makefile.am (man1_MANS): Likewise. * man/ja/Makefile.am (man1_MANS): Likewise. * man/nl/Makefile.am (man1_MANS): Likewise. * man/pl/Makefile.am (man1_MANS): Likewise. * man/pt/Makefile.am (man1_MANS): Likewise. * man/pt_BR/Makefile.am (man1_MANS): Likewise. * man/ru/Makefile.am (man1_MANS): Likewise. * man/sr/Makefile.am (man1_MANS): Likewise. * man/sv/Makefile.am (man1_MANS): Likewise. * man/tr/Makefile.am (man1_MANS): Likewise. * man/zh_CN/Makefile.am (man1_MANS): Likewise. * man/po4a/po4a.cfg: Add support for man-recode. * man/replace.sin.in: Substitute %man_recode% and %thman_recode%. * NEWS: Document this.