PageRenderTime 50ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 1ms

/Sources/selp_glibc-2.5.90-19.0.46/localedata/tst-locale.sh

https://bitbucket.org/Mali_Laurent/ps50c550
Shell | 62 lines | 32 code | 9 blank | 21 comment | 2 complexity | 1ccd26ce0dd59cd754e9e6ea4dc93086 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, LGPL-2.1, AGPL-1.0, CC-BY-SA-3.0, BSD-3-Clause
  1. #! /bin/sh
  2. # Testing the implementation of localedata.
  3. # Copyright (C) 1998, 2000 Free Software Foundation, Inc.
  4. # This file is part of the GNU C Library.
  5. # Contributed by Andreas Jaeger, <aj@arthur.rhein-neckar.de>, 1998.
  6. #
  7. # The GNU C Library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Lesser General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2.1 of the License, or (at your option) any later version.
  11. # The GNU C Library is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # Lesser General Public License for more details.
  15. # You should have received a copy of the GNU Lesser General Public
  16. # License along with the GNU C Library; if not, write to the Free
  17. # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18. # 02111-1307 USA.
  19. common_objpfx=$1; shift
  20. localedef=$1; shift
  21. test_locale ()
  22. {
  23. charmap=$1
  24. input=$2
  25. out=$3
  26. rep=$4
  27. if test $rep; then
  28. rep="--repertoire-map $rep"
  29. fi
  30. I18NPATH=. GCONV_PATH=${common_objpfx}iconvdata \
  31. LOCPATH=${common_objpfx}localedata LC_ALL=C LANGUAGE=C \
  32. ${localedef} --quiet -c -f $charmap -i $input \
  33. ${rep} ${common_objpfx}localedata/$out
  34. if [ $? -ne 0 ]; then
  35. echo "Charmap: \"${charmap}\" Inputfile: \"${input}\"" \
  36. "Outputdir: \"${out}\" failed"
  37. exit 1
  38. else
  39. echo "locale $out generated succesfully"
  40. fi
  41. }
  42. test_locale IBM437 de_DE de_DE.437
  43. test_locale tests/test1.cm tests/test1.def test1
  44. test_locale tests/test2.cm tests/test2.def test2
  45. test_locale tests/test3.cm tests/test3.def test3
  46. test_locale tests/test4.cm tests/test4.def test4
  47. test_locale tests/test5.cm tests/test5.def test5 tests/test5.ds
  48. test_locale tests/test6.cm tests/test6.def test6 tests/test6.ds
  49. test_locale tests/test7.cm tests/test7.def test7
  50. exit 0
  51. # Local Variables:
  52. # mode:shell-script
  53. # End: