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.tmp mcat-s-1.err mcat-s-1.out"
33 LC_MESSAGES=C LC_ALL= \
34 ${MSGCAT} --stringtable-input -o mcat-s-1.tmp mcat-s-1.in >mcat-s-1.err 2>&1
36 cat mcat-s-1.err | grep -v ': internationalized messages'
37 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
38 LC_ALL=C tr -d '\r' < mcat-s-1.tmp > mcat-s-1.out
39 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
41 tmpfiles="$tmpfiles mcat-s-1.ok"
42 cat << \EOF > mcat-s-1.ok
43 # This is an example of a string table file. Everything inside a comment
44 # is completely ignored, even if in "quotes", or \escape characters, etc.
47 msgstr "pattern II target 1"
49 # This is an example of excape codes in the string table, codes
50 # that are not one of abfnrtv are stripped of the \ character
53 "This is a tab \t and a return \n"
54 " or a \a but not a p"
57 msgstr "Well how about a "
59 # more parameters, white space between tokens is ignored
61 msgstr "0.000250 0.000250"
63 # a key with no value assumes the value is the empty string
64 msgid "hoe322070.element"
69 ${DIFF} mcat-s-1.ok mcat-s-1.out