home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
gettext-0.10.24-src.tgz
/
tar.out
/
fsf
/
gettext
/
checks
/
msgmerge-1
< prev
next >
Wrap
Lisp/Scheme
|
1996-09-28
|
2KB
|
82 lines
#! /bin/sh
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="mm-test1.in1 mm-test1.in2"
cat <<EOF > mm-test1.in1
# first
#. this should be discarded
msgid "1"
msgstr "1x"
# second
#: bogus:1
msgid "2"
msgstr "this is a really long msgstr "
"used to test the wraping to "
"make sure it works after all "
"what is a test for if not to test things?"
# third
msgid "3"
msgstr "3z"
EOF
cat <<EOF > mm-test1.in2
#. this is the first
#: snark.c:345
msgid "1"
msgstr ""
#. this is the second
#: hunt.c:759
msgid "2"
msgstr ""
#. this is the third
#: boojum.c:300
msgid "3"
msgstr ""
EOF
tmpfiles="$tmpfiles mm-test1.out"
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q mm-test1.in1 mm-test1.in2 -o mm-test1.out
tmpfiles="$tmpfiles mm-test1.ok"
cat << EOF > mm-test1.ok
# first
#. this is the first
#: snark.c:345
msgid "1"
msgstr "1x"
# second
#. this is the second
#: hunt.c:759
msgid "2"
msgstr ""
"this is a really long msgstr used to test the wraping to make sure it works "
"after all what is a test for if not to test things?"
# third
#. this is the third
#: boojum.c:300
msgid "3"
msgstr "3z"
EOF
: ${DIFF=diff}
${DIFF} mm-test1.ok mm-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: