summaryrefslogtreecommitdiff
path: root/checks/133.m4wrap
blob: d9aabb896ecff80bd552e6d73fb1602d7f22b4d2 (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
dnl @ ../doc/m4.texi:4932: Origin of test
dnl @ expected status: 0
dnl @ extra options: 
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
dnl @ Foundation, Inc.
dnl @ This file is free software; the Free Software Foundation
dnl @ gives unlimited permission to copy and/or distribute it
dnl @ with or without modifications, as long as this notice
dnl @ is preserved.
undivert(`wraplifo.m4')dnl
dnl @result{}dnl Redefine m4wrap to have LIFO semantics.
dnl @result{}define(`_m4wrap_level', `0')dnl
dnl @result{}define(`_m4wrap', defn(`m4wrap'))dnl
dnl @result{}define(`m4wrap',
dnl @result{}`ifdef(`m4wrap'_m4wrap_level,
dnl @result{}       `define(`m4wrap'_m4wrap_level,
dnl @result{}               `$1'defn(`m4wrap'_m4wrap_level))',
dnl @result{}       `_m4wrap(`define(`_m4wrap_level', incr(_m4wrap_level))dnl
dnl @result{}m4wrap'_m4wrap_level)dnl
dnl @result{}define(`m4wrap'_m4wrap_level, `$1')')')dnl
include(`wraplifo.m4')
dnl @result{}
m4wrap(`a`'m4wrap(`c
', `d')')m4wrap(`b')
dnl @result{}
dnl @result{}bac