summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4/tests/quotes.m4
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/m4/tests/quotes.m4')
-rw-r--r--usr.bin/m4/tests/quotes.m458
1 files changed, 58 insertions, 0 deletions
diff --git a/usr.bin/m4/tests/quotes.m4 b/usr.bin/m4/tests/quotes.m4
new file mode 100644
index 0000000..c783e22
--- /dev/null
+++ b/usr.bin/m4/tests/quotes.m4
@@ -0,0 +1,58 @@
+dnl $FreeBSD$
+dnl $OpenBSD: src/regress/usr.bin/m4/quotes.m4,v 1.2 2005/09/06 15:33:21 espie Exp $
+dnl Checking the way changequote() is supposed to work
+define(`string',`STRING')dnl
+1: normal
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
+
+2: kill quotes
+changequote()dnl
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
+
+3: normal changed quote
+changequote([,])dnl
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
+
+4: empty quotes, kill them too
+changequote(,)dnl
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
+
+5: start quote only
+changequote(`)dnl
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
+
+6: normal quotes are back
+changequote
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
+
+7: start quote+empty end quote
+changequote([,)dnl
+`quoted string'
+[quoted string]
+normal string
+`half quoted string
+going up to that string'
OpenPOWER on IntegriCloud