Imported Upstream version 1.4.17
[platform/upstream/m4.git] / checks / 085.foreach
1 dnl @ ../doc/m4.texi:3404: Origin of test
2 dnl @ expected status: 0
3 dnl @ extra options: 
4 dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
5 dnl @ Foundation, Inc.
6 dnl @ This file is free software; the Free Software Foundation
7 dnl @ gives unlimited permission to copy and/or distribute it
8 dnl @ with or without modifications, as long as this notice
9 dnl @ is preserved.
10 define(`a', `1')define(`b', `2')define(`c', `3')
11 dnl @result{}
12 include(`foreach.m4')
13 dnl @result{}
14 include(`foreachq.m4')
15 dnl @result{}
16 foreach(`x', `(``a'', ``(b'', ``c)'')', `x
17 ')
18 dnl @result{}1
19 dnl @result{}(2)1
20 dnl @result{}
21 dnl @result{}, x
22 dnl @result{})
23 foreachq(`x', ```a'', ``(b'', ``c)''', `x
24 ')dnl
25 dnl @result{}a
26 dnl @result{}(b
27 dnl @result{}c)