bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #59461] smoke-test_html_device.sh: make the test more independent o


From: Bjarni Ingi Gislason
Subject: [bug #59461] smoke-test_html_device.sh: make the test more independent of locale
Date: Sun, 15 Nov 2020 21:02:47 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

[Prev in Thread] Current Thread [Next in Thread]