Follow-up Comment #3, bug #59461 (project groff):

  I am expanding the scope of the tests,
to test as many of them without a specific charmap interfering.

  Additionally to a missing "unset GROFF_ENCODING",
an "export" was missing in front of "LC_CTYPE=C.UTF-8".

  Oder of the tests matters.

  Not using "preconv" can matter.

  The test can be made variable with "LC_ALL=..." in front of the file.

  This is an improved version of the test file:

#!/bin/sh
#
groff="${abs_top_builddir:-.}/test-groff"

if test -x $groff;
then
  :
else
  groff=test-groff
  if command -v $groff > /dev/null
  then
    :
  else
    groff=groff
  fi
fi

echo Used groff is `which "$groff"`

#set -e

unset GROFF_ENCODING

echo 'testing -C -Thtml with'" \('a" >&2
printf "\('a" | "$groff" -C -Thtml | grep -qx '<p>&aacute;</p>' || \
  { echo Test failed >&2; exit 1; }

echo 'testing -C -Thtml with á' >&2
printf 'á' | "$groff" -C -Thtml | grep -qx '<p>&aacute;</p>' || \
  { echo Test failed >&2; exit 1; }

echo 'testing -Thtml with -Kutf8' >&2

export LC_CTYPE=C.UTF-8

test "$(locale charmap)" = UTF-8 || { echo charmap failed >&2; exit 77; } #
skip
printf '\303\241' | "$groff" -Kutf8 -Thtml | grep -qx '<p>&aacute;</p>' ||\
  { echo Test failed >&2; exit 1; }



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59461>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to