No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-objc-1
blob2faf22c490b78da27946009925fbc32648564720
1 #! /bin/sh
3 # Test ObjectiveC extractor.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-ob-1.m"
9 cat <<\EOF > xg-ob-1.m
10 id str = _(@
11 "conca" /* comment */
13 // another comment
14 "tenated");
16 _(@"foo") _ ( @"foo2" /* test */ )
18 "_()"
20 " \" _(foo) \" /* comment "
22 _ // test
23 (@ /* comment " */ "test"
25 " test2"
28 NSLocalizedString(@"Information", @"")
29 EOF
31 tmpfiles="$tmpfiles xg-ob-1.po"
32 : ${XGETTEXT=xgettext}
33 ${XGETTEXT} --omit-header -k_ -kNSLocalizedString xg-ob-1.m -d xg-ob-1
34 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
36 tmpfiles="$tmpfiles xg-ob-1.ok"
37 cat <<\EOF > xg-ob-1.ok
38 #: xg-ob-1.m:2
39 msgid "concatenated"
40 msgstr ""
42 #: xg-ob-1.m:7
43 msgid "foo"
44 msgstr ""
46 #: xg-ob-1.m:7
47 msgid "foo2"
48 msgstr ""
50 #: xg-ob-1.m:14
51 msgid "test test2"
52 msgstr ""
54 #: xg-ob-1.m:19
55 msgid "Information"
56 msgstr ""
57 EOF
59 : ${DIFF=diff}
60 ${DIFF} xg-ob-1.ok xg-ob-1.po
61 result=$?
63 rm -fr $tmpfiles
65 exit $result