Imported Upstream version 1.4.17
[platform/upstream/m4.git] / checks / 043.pseudo_arg
1 dnl @ ../doc/m4.texi:2119: 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(`echo', `$@')dnl
11 echo(echo(`01234567890123456789', `01234567890123456789')
12 echo(`98765432109876543210', `98765432109876543210'))
13 dnl @result{}01234567890123456789,01234567890123456789
14 dnl @result{}98765432109876543210,98765432109876543210
15 len((echo(`01234567890123456789',
16           `01234567890123456789')echo(`98765432109876543210',
17                                       `98765432109876543210')))
18 dnl @result{}84
19 indir(`echo', indir(`echo', `01234567890123456789',
20                             `01234567890123456789')
21 indir(`echo', `98765432109876543210', `98765432109876543210'))
22 dnl @result{}01234567890123456789,01234567890123456789
23 dnl @result{}98765432109876543210,98765432109876543210
24 define(`argn', `$#')dnl
25 define(`echo1', `-$@-')define(`echo2', `,$@,')dnl
26 echo1(`1', `2', `3') argn(echo1(`1', `2', `3'))
27 dnl @result{}-1,2,3- 3
28 echo2(`1', `2', `3') argn(echo2(`1', `2', `3'))
29 dnl @result{},1,2,3, 5