• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test --sort-by-file option, when no file positions are present.
5
6cat <<\EOF > mm-test29.po
7msgid "a"
8msgstr "a"
9
10#~ msgid "c"
11#~ msgstr "c"
12
13#~ msgid "d"
14#~ msgstr "d"
15
16#~ msgid "b"
17#~ msgstr "b"
18EOF
19
20cat <<EOF > mm-test29.pot
21msgid "a"
22msgstr ""
23EOF
24
25: ${MSGMERGE=msgmerge}
26${MSGMERGE} -q --sort-by-file -o mm-test29.tmp mm-test29.po mm-test29.pot || Exit 1
27LC_ALL=C tr -d '\r' < mm-test29.tmp > mm-test29.po2 || Exit 1
28${MSGMERGE} -q --sort-by-file -o mm-test29.tmp mm-test29.po2 mm-test29.pot || Exit 1
29LC_ALL=C tr -d '\r' < mm-test29.tmp > mm-test29.po3 || Exit 1
30
31cat <<\EOF > mm-test29.ok
32msgid "a"
33msgstr "a"
34
35#~ msgid "b"
36#~ msgstr "b"
37
38#~ msgid "c"
39#~ msgstr "c"
40
41#~ msgid "d"
42#~ msgstr "d"
43EOF
44
45: ${DIFF=diff}
46${DIFF} mm-test29.ok mm-test29.po2 || Exit 1
47${DIFF} mm-test29.ok mm-test29.po3 || Exit 1
48
49Exit 0
50