1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test -j option with charset conversion from ISO-8859-1 to UTF-8. 4 1.1 christos 5 1.1 christos tmpfiles="" 6 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 7 1.1 christos 8 1.1 christos tmpfiles="$tmpfiles xg-test8.po" 9 1.1 christos cat <<\EOF > xg-test8.po 10 1.1 christos # SOME DESCRIPTIVE TITLE. 11 1.1 christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 12 1.1 christos # This file is distributed under the same license as the PACKAGE package. 13 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 14 1.1 christos # 15 1.1 christos #, fuzzy 16 1.1 christos msgid "" 17 1.1 christos msgstr "" 18 1.1 christos "Project-Id-Version: PACKAGE VERSION\n" 19 1.1 christos "Report-Msgid-Bugs-To: \n" 20 1.1 christos "POT-Creation-Date: 2004-10-22 12:39+0200\n" 21 1.1 christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 22 1.1 christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 23 1.1 christos "Language-Team: LANGUAGE <LL (at] li.org>\n" 24 1.1 christos "MIME-Version: 1.0\n" 25 1.1 christos "Content-Type: text/plain; charset=ISO-8859-1\n" 26 1.1 christos "Content-Transfer-Encoding: 8bit\n" 27 1.1 christos 28 1.1 christos #: fifo.c:4 29 1.1 christos msgid "@(#)fifo.c\t1.56 04/10/10 Copyright 1989, 1994-2003 Jrg Schilling" 30 1.1 christos msgstr "" 31 1.1 christos EOF 32 1.1 christos 33 1.1 christos tmpfiles="$tmpfiles xg-test8.in.c" 34 1.1 christos cat <<EOF > xg-test8.in.c 35 1.1 christos _("extract me") 36 1.1 christos EOF 37 1.1 christos 38 1.1 christos : ${XGETTEXT=xgettext} 39 1.1 christos ${XGETTEXT} -a -j -o xg-test8.po xg-test8.in.c 40 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 41 1.1 christos 42 1.1 christos tmpfiles="$tmpfiles xg-test8.pot" 43 1.1 christos sed -e '/POT-Creation-Date/d' < xg-test8.po > xg-test8.pot 44 1.1 christos 45 1.1 christos tmpfiles="$tmpfiles xg-test8.ok" 46 1.1 christos cat <<\EOF > xg-test8.ok 47 1.1 christos # SOME DESCRIPTIVE TITLE. 48 1.1 christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 49 1.1 christos # This file is distributed under the same license as the PACKAGE package. 50 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 51 1.1 christos # 52 1.1 christos #, fuzzy 53 1.1 christos msgid "" 54 1.1 christos msgstr "" 55 1.1 christos "Project-Id-Version: PACKAGE VERSION\n" 56 1.1 christos "Report-Msgid-Bugs-To: \n" 57 1.1 christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 58 1.1 christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 59 1.1 christos "Language-Team: LANGUAGE <LL (at] li.org>\n" 60 1.1 christos "MIME-Version: 1.0\n" 61 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 62 1.1 christos "Content-Transfer-Encoding: 8bit\n" 63 1.1 christos 64 1.1 christos #: fifo.c:4 65 1.1 christos msgid "@(#)fifo.c\t1.56 04/10/10 Copyright 1989, 1994-2003 Jrg Schilling" 66 1.1 christos msgstr "" 67 1.1 christos 68 1.1 christos #: xg-test8.in.c:1 69 1.1 christos msgid "extract me" 70 1.1 christos msgstr "" 71 1.1 christos EOF 72 1.1 christos 73 1.1 christos : ${DIFF=diff} 74 1.1 christos ${DIFF} xg-test8.ok xg-test8.pot 75 1.1 christos result=$? 76 1.1 christos 77 1.1 christos rm -fr $tmpfiles 78 1.1 christos 79 1.1 christos exit $result 80