1*9b9cf381SPeter Avalosdnl $FreeBSD: src/tools/regression/usr.bin/m4/quotes.m4,v 1.2 2012/11/17 01:53:59 svnexp Exp $ 2*9b9cf381SPeter Avalosdnl $OpenBSD: src/regress/usr.bin/m4/quotes.m4,v 1.2 2005/09/06 15:33:21 espie Exp $ 3*9b9cf381SPeter Avalosdnl Checking the way changequote() is supposed to work 4*9b9cf381SPeter Avalosdefine(`string',`STRING')dnl 5*9b9cf381SPeter Avalos1: normal 6*9b9cf381SPeter Avalos`quoted string' 7*9b9cf381SPeter Avalos[quoted string] 8*9b9cf381SPeter Avalosnormal string 9*9b9cf381SPeter Avalos`half quoted string 10*9b9cf381SPeter Avalosgoing up to that string' 11*9b9cf381SPeter Avalos 12*9b9cf381SPeter Avalos2: kill quotes 13*9b9cf381SPeter Avaloschangequote()dnl 14*9b9cf381SPeter Avalos`quoted string' 15*9b9cf381SPeter Avalos[quoted string] 16*9b9cf381SPeter Avalosnormal string 17*9b9cf381SPeter Avalos`half quoted string 18*9b9cf381SPeter Avalosgoing up to that string' 19*9b9cf381SPeter Avalos 20*9b9cf381SPeter Avalos3: normal changed quote 21*9b9cf381SPeter Avaloschangequote([,])dnl 22*9b9cf381SPeter Avalos`quoted string' 23*9b9cf381SPeter Avalos[quoted string] 24*9b9cf381SPeter Avalosnormal string 25*9b9cf381SPeter Avalos`half quoted string 26*9b9cf381SPeter Avalosgoing up to that string' 27*9b9cf381SPeter Avalos 28*9b9cf381SPeter Avalos4: empty quotes, kill them too 29*9b9cf381SPeter Avaloschangequote(,)dnl 30*9b9cf381SPeter Avalos`quoted string' 31*9b9cf381SPeter Avalos[quoted string] 32*9b9cf381SPeter Avalosnormal string 33*9b9cf381SPeter Avalos`half quoted string 34*9b9cf381SPeter Avalosgoing up to that string' 35*9b9cf381SPeter Avalos 36*9b9cf381SPeter Avalos5: start quote only 37*9b9cf381SPeter Avaloschangequote(`)dnl 38*9b9cf381SPeter Avalos`quoted string' 39*9b9cf381SPeter Avalos[quoted string] 40*9b9cf381SPeter Avalosnormal string 41*9b9cf381SPeter Avalos`half quoted string 42*9b9cf381SPeter Avalosgoing up to that string' 43*9b9cf381SPeter Avalos 44*9b9cf381SPeter Avalos6: normal quotes are back 45*9b9cf381SPeter Avaloschangequote 46*9b9cf381SPeter Avalos`quoted string' 47*9b9cf381SPeter Avalos[quoted string] 48*9b9cf381SPeter Avalosnormal string 49*9b9cf381SPeter Avalos`half quoted string 50*9b9cf381SPeter Avalosgoing up to that string' 51*9b9cf381SPeter Avalos 52*9b9cf381SPeter Avalos7: start quote+empty end quote 53*9b9cf381SPeter Avaloschangequote([,)dnl 54*9b9cf381SPeter Avalos`quoted string' 55*9b9cf381SPeter Avalos[quoted string] 56*9b9cf381SPeter Avalosnormal string 57*9b9cf381SPeter Avalos`half quoted string 58*9b9cf381SPeter Avalosgoing up to that string' 59