aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2012-08-23 16:29:59 +0200
committerSebastien Bacher <seb128@ubuntu.com>2012-08-23 16:29:59 +0200
commitc436f6348a087b7b55aa96948b6a12a4bb6f9015 (patch)
tree9f90b9bd30f4c2ccea4c1ce78df9c74946c87970 /tests
parent7a6621d316ea0825de80548f6d8db81e98f56099 (diff)
parentda6785e18dc73a968ce57055754bcc2718d4e131 (diff)
downloadayatana-indicator-session-c436f6348a087b7b55aa96948b6a12a4bb6f9015.tar.gz
ayatana-indicator-session-c436f6348a087b7b55aa96948b6a12a4bb6f9015.tar.bz2
ayatana-indicator-session-c436f6348a087b7b55aa96948b6a12a4bb6f9015.zip
* New upstream release:
- Menu items for users are too tall (lp: #1024395) - should update glib requirement (lp: #1023533) * Updating package to use current standards (dh9)
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/Makefile.am.strings38
-rw-r--r--tests/Makefile.in42
3 files changed, 83 insertions, 2 deletions
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)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ec73565..85f4e2b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -51,9 +51,10 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
TESTS = test-service$(EXEEXT)
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.am.strings \
+ $(srcdir)/Makefile.in
check_PROGRAMS = test-service$(EXEEXT)
subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -310,6 +311,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+CLEANFILES = $(TESTS)
+
+# stock UMB tests on user-visible strings
AM_CPPFLAGS = \
$(GTEST_CPPFLAGS) \
$(XORG_GTEST_CPPFLAGS) \
@@ -335,7 +339,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .cc .cpp .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.am.strings $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -356,6 +360,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/Makefile.am.strings:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -703,6 +708,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -799,6 +805,38 @@ uninstall-am:
tags uninstall uninstall-am
+#####
+# 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 $@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: