summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/msgmerge-compendium-6
blob: d5e7731573b0b702061c3dcc2f4f69e3982261dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test compendium option with mixed encodings.
# 8 combinations total:
#          POT file           PO file           Compendium
#       mm-ko.ascii.pot   mm-ko.euc-kr.po   mm-ko-comp.euc-kr.po
#       mm-ko.utf-8.pot   mm-ko.utf-8.po    mm-ko-comp.utf-8.po

: ${MSGCONV=msgconv}
${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot "$abs_srcdir"/mm-ko.ascii.pot

: ${MSGCONV=msgconv}
${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.po "$abs_srcdir"/mm-ko.euc-kr.po

: ${MSGCONV=msgconv}
${MSGCONV} --to-code=UTF-8 -o mm-ko-comp.utf-8.po "$abs_srcdir"/mm-ko-comp.euc-kr.po

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-AEE.tmp \
  --compendium "$abs_srcdir"/mm-ko-comp.euc-kr.po \
  "$abs_srcdir"/mm-ko.euc-kr.po "$abs_srcdir"/mm-ko.ascii.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-AEE.tmp > mm-c-6-AEE.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-AEU.tmp \
  --compendium mm-ko-comp.utf-8.po \
  "$abs_srcdir"/mm-ko.euc-kr.po "$abs_srcdir"/mm-ko.ascii.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-AEU.tmp > mm-c-6-AEU.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-AUE.tmp \
  --compendium "$abs_srcdir"/mm-ko-comp.euc-kr.po \
  mm-ko.utf-8.po "$abs_srcdir"/mm-ko.ascii.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-AUE.tmp > mm-c-6-AUE.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-AUU.tmp \
  --compendium mm-ko-comp.utf-8.po \
  mm-ko.utf-8.po "$abs_srcdir"/mm-ko.ascii.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-AUU.tmp > mm-c-6-AUU.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-UEE.tmp \
  --compendium "$abs_srcdir"/mm-ko-comp.euc-kr.po \
  "$abs_srcdir"/mm-ko.euc-kr.po mm-ko.utf-8.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-UEE.tmp > mm-c-6-UEE.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-UEU.tmp \
  --compendium mm-ko-comp.utf-8.po \
  "$abs_srcdir"/mm-ko.euc-kr.po mm-ko.utf-8.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-UEU.tmp > mm-c-6-UEU.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-UUE.tmp \
  --compendium "$abs_srcdir"/mm-ko-comp.euc-kr.po \
  mm-ko.utf-8.po mm-ko.utf-8.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-UUE.tmp > mm-c-6-UUE.out || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-c-6-UUU.tmp \
  --compendium mm-ko-comp.utf-8.po \
  mm-ko.utf-8.po mm-ko.utf-8.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-c-6-UUU.tmp > mm-c-6-UUU.out || Exit 1

: ${MSGCONV=msgconv}
${MSGCONV} --to-code=UTF-8 mm-c-6-UUU.out | LC_ALL=C tr -d '\r' > mm-c-6-U.ok
${MSGCONV} --to-code=EUC-KR mm-c-6-UUU.out | LC_ALL=C sed -e 's,EUC-KR,euc-kr,' | LC_ALL=C tr -d '\r' > mm-c-6-E.ok

: ${DIFF=diff}
${DIFF} mm-c-6-E.ok mm-c-6-AEE.out || { Exit 1; }
${DIFF} mm-c-6-E.ok mm-c-6-AEU.out || { Exit 1; }
${DIFF} mm-c-6-U.ok mm-c-6-AUE.out || { Exit 1; }
${DIFF} mm-c-6-U.ok mm-c-6-AUU.out || { Exit 1; }
${DIFF} mm-c-6-U.ok mm-c-6-UEE.out || { Exit 1; }
${DIFF} mm-c-6-U.ok mm-c-6-UEU.out || { Exit 1; }
${DIFF} mm-c-6-U.ok mm-c-6-UUE.out || { Exit 1; }
${DIFF} mm-c-6-U.ok mm-c-6-UUU.out || { Exit 1; }

Exit 0