aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am.strings
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-07-11 12:10:21 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-07-11 12:10:21 -0500
commit6401fdd7f7414cc16009bbd1a261dfaa36cbbacc (patch)
tree21f715c4d68d04b7c86d2a5849eefaacf1996256 /tests/Makefile.am.strings
parent8e7ee28533094e6f3e5d9968e3841e5af38bf1ba (diff)
parent2343edb9f2a49354ab3d46a2fec85b840daf0709 (diff)
downloadayatana-indicator-power-6401fdd7f7414cc16009bbd1a261dfaa36cbbacc.tar.gz
ayatana-indicator-power-6401fdd7f7414cc16009bbd1a261dfaa36cbbacc.tar.bz2
ayatana-indicator-power-6401fdd7f7414cc16009bbd1a261dfaa36cbbacc.zip
merge lp:~charlesk/indicator-power/coverage
Diffstat (limited to 'tests/Makefile.am.strings')
-rw-r--r--tests/Makefile.am.strings38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/Makefile.am.strings b/tests/Makefile.am.strings
new file mode 100644
index 0000000..26a23a8
--- /dev/null
+++ b/tests/Makefile.am.strings
@@ -0,0 +1,38 @@
+TESTS += \
+ test-ellipsis \
+ test-space-ellipsis \
+ test-ascii-quotes
+
+#####
+# Tests for there being proper ellipsis instead of three periods in a row
+#####
+test-ellipsis: $(top_srcdir)/po
+ @echo "#!/bin/bash" > $@
+ @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@
+ @echo "grep -c -e \"^msgid.*\.\.\.\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Ellipsis found in user visible strings\" >&2 && exit 1" >> $@
+ @echo "exit 0" >> $@
+ @chmod +x $@
+
+#####
+# Tests for there being a space before an ellipsis
+#####
+test-space-ellipsis: $(top_srcdir)/po
+ @echo "#!/bin/bash" > $@
+ @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@
+ @echo "grep -c -e \"^msgid.* …\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Space before ellipsis found in user visible strings\" >&2 && exit 1" >> $@
+ @echo "exit 0" >> $@
+ @chmod +x $@
+
+#####
+# Tests for ASCII quote types
+#####
+test-ascii-quotes: $(top_srcdir)/po
+ @echo "#!/bin/bash" > $@
+ @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@
+ @echo "grep -c -e \"^msgid \\\".*'.*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII apostrophy found in user visible strings\" >&2 && exit 1" >> $@
+ @echo "grep -c -e \"^msgid \\\".*\\\".*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII quote found in user visible strings\" >&2 && exit 1" >> $@
+ @echo "grep -c -e \"^msgid \\\".*\\\`.*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII backtick found in user visible strings\" >&2 && exit 1" >> $@
+ @echo "exit 0" >> $@
+ @chmod +x $@
+
+CLEANFILES += $(TESTS)