No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcat-stringtable-1
blob0d68a5196bddbca601dc11d1eebf6a696c217016
1 #! /bin/sh
3 # Test reading in NeXTstep/GNUstep .strings syntax.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mcat-s-1.in"
9 cat <<\EOF > mcat-s-1.in
10 /* This is an example of a string table file. Everything inside a comment
11 is completely ignored, even if in "quotes", or \escape characters, etc.
14 "title" = "pattern II target 1";
16 /* This is an example of excape codes in the string table, codes */
17 /* that are not one of abfnrtv are stripped of the \ character */
18 "escapes" = "This is a tab \t and a return \n or a \a but not a \p";
19 "escapes2" = "Well how about a \0? Guess not.";
21 /* more parameters, white space between tokens is ignored */
22 "actualSize"
24 "0.000250 0.000250";
26 /* a key with no value assumes the value is the empty string */
27 "hoe322070.element";
28 EOF
30 tmpfiles="$tmpfiles mcat-s-1.out"
31 rm -f mcat-s-1.out
32 : ${MSGCAT=msgcat}
33 ${MSGCAT} --stringtable-input mcat-s-1.in -o mcat-s-1.out
34 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
36 tmpfiles="$tmpfiles mcat-s-1.ok"
37 cat << \EOF > mcat-s-1.ok
38 # This is an example of a string table file. Everything inside a comment
39 # is completely ignored, even if in "quotes", or \escape characters, etc.
41 msgid "title"
42 msgstr "pattern II target 1"
44 # This is an example of excape codes in the string table, codes
45 # that are not one of abfnrtv are stripped of the \ character
46 msgid "escapes"
47 msgstr ""
48 "This is a tab \t and a return \n"
49 " or a \a but not a p"
51 msgid "escapes2"
52 msgstr "Well how about a "
54 # more parameters, white space between tokens is ignored
55 msgid "actualSize"
56 msgstr "0.000250 0.000250"
58 # a key with no value assumes the value is the empty string
59 msgid "hoe322070.element"
60 msgstr ""
61 EOF
63 : ${DIFF=diff}
64 ${DIFF} mcat-s-1.ok mcat-s-1.out
65 result=$?
67 rm -fr $tmpfiles
69 exit $result