3 # Test reading in NeXTstep/GNUstep .strings syntax.
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
*/
26 /* a key with no value assumes the value is the empty string
*/
30 tmpfiles
="$tmpfiles mcat-s-1.out"
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.
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
48 "This is a tab \t and a return \n"
49 " or a \a but not a p"
52 msgstr
"Well how about a "
54 # more parameters, white space between tokens is ignored
56 msgstr
"0.000250 0.000250"
58 # a key with no value assumes the value is the empty string
59 msgid
"hoe322070.element"
64 ${DIFF} mcat-s-1.ok mcat-s-1.out