summaryrefslogtreecommitdiffstats
path: root/tests/msgunfmt-1
blob: 89ffffd020f4c4c38aa265bd70511c7f2e5d3c40 (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
#! /bin/sh

trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="mu-test1.in"
cat <<EOF > mu-test1.in
msgid "eight"
msgstr "eighth"

msgid "five"
msgstr "fifth"

msgid "four"
msgstr "fourth"

msgid "one"
msgstr "first"

msgid "seven"
msgstr "seventh"

msgid "six"
msgstr "sixth"

msgid "three"
msgstr "third"

msgid "two"
msgstr "second"
EOF

tmpfiles="$tmpfiles mu-test1.mo"
: ${MSGFMT=msgfmt}
${MSGFMT} mu-test1.in -o mu-test1.mo

tmpfiles="$tmpfiles mu-test1.out"
: ${MSGUNFMT=msgunfmt}
${MSGUNFMT} mu-test1.mo -o mu-test1.out

: ${DIFF=diff}
${DIFF} mu-test1.in mu-test1.out
result=$?

rm -fr $tmpfiles

exit $result

# Preserve executable bits for this shell script.
# Thanks to Noah Friedman for this great trick.
Local Variables:
eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
eval:(make-local-variable 'file-mode)
eval:(setq file-mode (file-modes (buffer-file-name)))
eval:(make-local-variable 'after-save-hook)
eval:(add-hook 'after-save-hook 'frobme)
End: