summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-03-24 11:28:20 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-03-24 11:28:20 +0000
commitbf48fbeb6e45e01ed23b9a296a93b2f5376da603 (patch)
tree1fff98abbc7bb9858f514fff01f02ac9f8bbe3bc /regress/usr.bin
parent5a33f2d21917f9f33c48435ac70bbb0f3d6d881e (diff)
translit tests, Nigel Taylor
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/m4/Makefile10
-rw-r--r--regress/usr.bin/m4/gnutranslit2.out6
-rw-r--r--regress/usr.bin/m4/translit2.m48
-rw-r--r--regress/usr.bin/m4/translit2.out6
4 files changed, 28 insertions, 2 deletions
diff --git a/regress/usr.bin/m4/Makefile b/regress/usr.bin/m4/Makefile
index fdd235e101e..e001ba483ae 100644
--- a/regress/usr.bin/m4/Makefile
+++ b/regress/usr.bin/m4/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.28 2010/03/23 20:11:52 espie Exp $
+# $OpenBSD: Makefile,v 1.29 2011/03/24 11:28:19 espie Exp $
FIBOMAX=25
M4=m4
@@ -12,7 +12,7 @@ REGRESS_TARGETS= test-ff_after_dnl test-m4wrap test-m4wrap2 \
test-weird test-args test-args2 test-esyscmd test-eval test-gnupatterns \
test-gnupatterns2 test-comments test-synch1 test-synch1bis \
test-gnuformat test-includes test-dumpdef test-gnuprefix \
- test-translit
+ test-translit test-translit2 test-gnutranslit2
test-ff_after_dnl: ff_after_dnl.m4
${M4} ff_after_dnl.m4 | diff - ${.CURDIR}/ff_after_dnl.out
@@ -103,6 +103,12 @@ test-gnuprefix:
${M4} -P ${.CURDIR}/gnuprefix.m4 2>&1 | \
diff -u - ${.CURDIR}/gnuprefix.out
+test-translit2:
+ ${M4} ${.CURDIR}/translit2.m4 | diff -u - ${.CURDIR}/translit2.out
+
+test-gnutranslit2:
+ ${M4} -g ${.CURDIR}/translit2.m4 | diff -u - ${.CURDIR}/gnutranslit2.out
+
.PHONY: ${REGRESS_TARGETS}
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/m4/gnutranslit2.out b/regress/usr.bin/m4/gnutranslit2.out
new file mode 100644
index 00000000000..5c88e734a07
--- /dev/null
+++ b/regress/usr.bin/m4/gnutranslit2.out
@@ -0,0 +1,6 @@
+[HAVE_abc def h/]
+[HAVE_abc~def~h/]
+ABCDEFGHIJ
+ABCDEFGHIJ
+ABC-0980-ZYX
+ABC-0980-ZYX
diff --git a/regress/usr.bin/m4/translit2.m4 b/regress/usr.bin/m4/translit2.m4
new file mode 100644
index 00000000000..5c53a57cf3c
--- /dev/null
+++ b/regress/usr.bin/m4/translit2.m4
@@ -0,0 +1,8 @@
+translit(`[HAVE_abc/def.h
+]', `
+/.', `/ ')
+translit(`[HAVE_abc/def.h=]', `=/.', `/~~')
+translit(`0123456789', `0123456789', `ABCDEFGHIJ')
+translit(`0123456789', `[0-9]', `[A-J]')
+translit(`abc-0980-zyx', `abcdefghijklmnopqrstuvwxyz', `ABCDEFGHIJKLMNOPQRSTUVWXYZ')
+translit(`abc-0980-zyx', `[a-z]', `[A-Z]')
diff --git a/regress/usr.bin/m4/translit2.out b/regress/usr.bin/m4/translit2.out
new file mode 100644
index 00000000000..5c561770fa4
--- /dev/null
+++ b/regress/usr.bin/m4/translit2.out
@@ -0,0 +1,6 @@
+[HAVE_abc def h/]
+[HAVE_abc~def~h/]
+ABCDEFGHIJ
+A12345678J
+ABC-0980-ZYX
+Abc-0980-Zyx