aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am.strings
blob: 26a23a8683334039cc4e3375a85e4faa9e15cfc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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)