aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am45
1 files changed, 7 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am
index d63dac8..8fb5d77 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,12 @@ SUBDIRS = \
data \
po
+if BUILD_TESTS
+SUBDIRS += tests
+# build src first
+tests: src
+endif
+
EXTRA_DIST = autogen.sh
DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
@@ -34,41 +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