Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#! /bin/sh

# Test msgcat on a PO files with previous msgids.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="$tmpfiles mcat-test16.in1"
cat <<\EOF > mcat-test16.in1
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANSLATORS: An error message.
#: src/args.c:242
#, fuzzy, c-format
#| msgid "too many arguments"
msgid "too large arguments"
msgstr "zu viele Argumente"

# Oder besser "fehlende Argumente"?
#. TRANSLATORS: An error message.
#: src/args.c:273
#, c-format
#| msgid "missing arguments"
msgid "Missing arguments."
msgstr "Argumente fehlen."
EOF

tmpfiles="$tmpfiles mcat-test16.in2"
cat <<\EOF > mcat-test16.in2
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANSLATORS: An error message.
#: src/args.c:242
#, fuzzy, c-format
#| msgid "too few arguments"
msgid "too large arguments"
msgstr "zu wenige Argumente"
EOF

tmpfiles="$tmpfiles mcat-test16.out"
rm -f mcat-test16.out
: ${MSGCAT=msgcat}
${MSGCAT} -o mcat-test16.out mcat-test16.in1 mcat-test16.in2
test $? = 0 || { rm -fr $tmpfiles; exit 1; }

tmpfiles="$tmpfiles mcat-test16.ok"
cat <<\EOF > mcat-test16.ok
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANSLATORS: An error message.
#: src/args.c:242
#, fuzzy, c-format
msgid "too large arguments"
msgstr ""
"#-#-#-#-#  mcat-test16.in1  #-#-#-#-#\n"
"zu viele Argumente\n"
"#-#-#-#-#  mcat-test16.in2  #-#-#-#-#\n"
"zu wenige Argumente"

# Oder besser "fehlende Argumente"?
#. TRANSLATORS: An error message.
#: src/args.c:273
#, c-format
#| msgid "missing arguments"
msgid "Missing arguments."
msgstr "Argumente fehlen."
EOF

: ${DIFF=diff}
${DIFF} mcat-test16.ok mcat-test16.out
result=$?

rm -fr $tmpfiles

exit $result