#!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# More tests for C# support: UTF-8 encoded source files
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles="$tmpfiles xg-cs-2.cs"
cat <<\EOF > xg-cs-2.cs
class TestCase {
public static void Main (String[] args) {
Console.WriteLine(GetString("Script: \U0001d49e"));
// And now a comment with Русский and 日本語 and Unicode escapes: B\u00f6se B\u00fcbchen
Console.WriteLine(GetString("This string has a multilingual comment"));
+ // Unicode identifiers.
+ String あ = "";
+ String 𐀀 = "";
+ int \u65e5\u672c\u8a9e = 1;
}
}
EOF
-tmpfiles="$tmpfiles xg-cs-2.po"
: ${XGETTEXT=xgettext}
# delete POT-Creation-Date: line because the date depends on local time.
${XGETTEXT} --output - --add-location -c --from-code=UTF-8 xg-cs-2.cs \
- | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-cs-2.po
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+ | sed '/\"POT-Creation-Date:.*/d' | LC_ALL=C tr -d '\r' > xg-cs-2.po || exit 1
-tmpfiles="$tmpfiles xg-cs-2.ok"
cat <<\EOF > xg-cs-2.ok
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
${DIFF} xg-cs-2.ok xg-cs-2.po
result=$?
-rm -fr $tmpfiles
-
exit $result