aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am.strings
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-11-07 08:55:12 +0000
committerTarmac <Unknown>2012-11-07 08:55:12 +0000
commit2893be94b74895718d829b2f22388ea607de0980 (patch)
treed6a8e1a54f050aad7e2b97d9614b2252597a3179 /tests/Makefile.am.strings
parentd1bb8ca95f0f9d39c344fa41e297c73e88143800 (diff)
parent7ebd1bec24a732a0f7069e727ff4036f6b925e99 (diff)
downloadayatana-indicator-datetime-2893be94b74895718d829b2f22388ea607de0980.tar.gz
ayatana-indicator-datetime-2893be94b74895718d829b2f22388ea607de0980.tar.bz2
ayatana-indicator-datetime-2893be94b74895718d829b2f22388ea607de0980.zip
Add scaffolding for Google Tests. Fixes: https://bugs.launchpad.net/bugs/985060.
Approved by Lars Uebernickel, PS Jenkins bot.
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)