1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test C# support: Unicode character escape handling 5 6cat <<\EOF > xg-cs-8.cs 7// Valid: 8string s1 = "\U00020213"; // Codepoint U+20213 9string s2 = "\uD840\uDE13"; // Encoded form of U+20213 10string s3 = "\uD840\U0000DE13"; // Encoded form of U+20213 11string s4 = "\U0000D840\uDE13"; // Encoded form of U+20213 12string s5 = "\U0000D840\U0000DE13"; // Encoded form of U+20213 13string s6 = "\xD840\xDE13"; // Encoded form of U+20213 14 15// Invalid: 16string i1 = "\U0020213"; // Unterminated 17string i2 = "\uD840\u3032"; // Missing low surrogate 18string i3 = "\uD840\uDE1"; // Unterminated after a high surrogate 19EOF 20 21: ${XGETTEXT=xgettext} 22${XGETTEXT} --output xg-cs-8.tmp --add-location xg-cs-8.cs -a 2>/dev/null || Exit 1 23sed -e '/\"POT-Creation-Date:.*/d' < xg-cs-8.tmp | LC_ALL=C tr -d '\r' > xg-cs-8.po || Exit 1 24 25cat <<\EOF > xg-cs-8.ok 26# SOME DESCRIPTIVE TITLE. 27# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 28# This file is distributed under the same license as the PACKAGE package. 29# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 30# 31#, fuzzy 32msgid "" 33msgstr "" 34"Project-Id-Version: PACKAGE VERSION\n" 35"Report-Msgid-Bugs-To: \n" 36"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 37"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 38"Language-Team: LANGUAGE <LL@li.org>\n" 39"Language: \n" 40"MIME-Version: 1.0\n" 41"Content-Type: text/plain; charset=UTF-8\n" 42"Content-Transfer-Encoding: 8bit\n" 43 44#: xg-cs-8.cs:2 xg-cs-8.cs:3 xg-cs-8.cs:4 xg-cs-8.cs:5 xg-cs-8.cs:6 45#: xg-cs-8.cs:7 46msgid "" 47msgstr "" 48 49#: xg-cs-8.cs:10 50msgid "\\U0020213" 51msgstr "" 52 53#: xg-cs-8.cs:11 54msgid "�〲" 55msgstr "" 56 57#: xg-cs-8.cs:12 58msgid "�\\uDE1" 59msgstr "" 60EOF 61 62: ${DIFF=diff} 63${DIFF} xg-cs-8.ok xg-cs-8.po 64result=$? 65 66exit $result 67