aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-05-02 17:25:16 -0700
committerCharles Kerr <charles.kerr@canonical.com>2012-05-02 17:25:16 -0700
commit894f448bb3ce9c0cd033f486aaaedda0d7a4281b (patch)
treeaba9a2a5890b7b82c68ca8a7f8ba2870a62302cd
parentb7a6eedae94cf5276cc549e44af5b4fe7849bda5 (diff)
downloadayatana-indicator-session-894f448bb3ce9c0cd033f486aaaedda0d7a4281b.tar.gz
ayatana-indicator-session-894f448bb3ce9c0cd033f486aaaedda0d7a4281b.tar.bz2
ayatana-indicator-session-894f448bb3ce9c0cd033f486aaaedda0d7a4281b.zip
extract the strings test into their own Makefile so that we can share it among other indicators
-rw-r--r--Makefile.am39
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/Makefile.am.strings38
3 files changed, 43 insertions, 39 deletions
diff --git a/Makefile.am b/Makefile.am
index ad42d8e..8fb5d77 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,43 +40,4 @@ dist-hook:
echo Failed to generate AUTHORS: not a branch >&2; \
fi
-TESTS = \
- test-ellipsis \
- test-space-ellipsis \
- test-ascii-quotes
-
-#####
-# Tests for there being proper ellipsis instead of three periods in a row
-#####
-test-ellipsis: po
- @echo "#!/bin/bash" > $@
- @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
- @echo "grep -c -e \"^msgid.*\.\.\.\\\"\" 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: po
- @echo "#!/bin/bash" > $@
- @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
- @echo "grep -c -e \"^msgid.* …\\\"\" 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: po
- @echo "#!/bin/bash" > $@
- @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
- @echo "grep -c -e \"^msgid \\\".*'.*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII apostrophy found in user visible strings\" >&2 && exit 1" >> $@
- @echo "grep -c -e \"^msgid \\\".*\\\".*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII quote found in user visible strings\" >&2 && exit 1" >> $@
- @echo "grep -c -e \"^msgid \\\".*\\\`.*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII backtick found in user visible strings\" >&2 && exit 1" >> $@
- @echo "exit 0" >> $@
- @chmod +x $@
-
-CLEANFILES = $(TESTS)
-
include $(top_srcdir)/Makefile.am.coverage
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0d30bba..5f22130 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,3 +1,8 @@
+TESTS =
+CLEANFILES =
+
+# stock UMB tests on user-visible strings
+include $(srcdir)/Makefile.am.strings
AM_CPPFLAGS = \
$(GTEST_CPPFLAGS) \
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)