summaryrefslogtreecommitdiff
path: root/gettext-tools/tests/xgettext-csharp-7
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-12-24 07:38:37 +0000
committer <>2015-02-02 12:02:29 +0000
commit482840e61f86ca321838a91e902c41d40c098bbb (patch)
tree01ea2e242fd2792d19fe192476601587901db794 /gettext-tools/tests/xgettext-csharp-7
downloadgettext-tarball-482840e61f86ca321838a91e902c41d40c098bbb.tar.gz
Imported from /home/lorry/working-area/delta_gettext-tarball/gettext-0.19.4.tar.xz.gettext-0.19.4
Diffstat (limited to 'gettext-tools/tests/xgettext-csharp-7')
-rwxr-xr-xgettext-tools/tests/xgettext-csharp-728
1 files changed, 28 insertions, 0 deletions
diff --git a/gettext-tools/tests/xgettext-csharp-7 b/gettext-tools/tests/xgettext-csharp-7
new file mode 100755
index 0000000..9f5643b
--- /dev/null
+++ b/gettext-tools/tests/xgettext-csharp-7
@@ -0,0 +1,28 @@
+#! /bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
+
+# Test C# support: extraction of contexts.
+
+cat <<\EOF > xg-cs-7.cs
+Console.WriteLine(rm.GetString("help"));
+Console.WriteLine(rm.GetParticularString("Help", "about"));
+EOF
+
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location -d xg-cs-7.tmp xg-cs-7.cs || exit 1
+LC_ALL=C tr -d '\r' < xg-cs-7.tmp.po > xg-cs-7.po || exit 1
+
+cat <<EOF > xg-cs-7.ok
+msgid "help"
+msgstr ""
+
+msgctxt "Help"
+msgid "about"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-cs-7.ok xg-cs-7.po
+result=$?
+
+exit $result