summaryrefslogtreecommitdiffstats
path: root/tests/msgunfmt-1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/msgunfmt-1')
-rwxr-xr-xtests/msgunfmt-156
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/msgunfmt-1 b/tests/msgunfmt-1
new file mode 100755
index 0000000..89ffffd
--- /dev/null
+++ b/tests/msgunfmt-1
@@ -0,0 +1,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: