summaryrefslogtreecommitdiff
path: root/tests/gentest/ifdef.1.test
blob: fb9951c79d3b3734b15cc19b633b73df69f469bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# gentest/ifdef.1.test is part of the GNU m4 testsuite
# generated from example in ../doc/m4.texinfo line 1440

. ${srcdir}/defs

cat <<\EOF >in
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
define(`foo', `')
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
EOF

cat <<\EOF >ok
foo is not defined

foo is defined
EOF

$M4 -d in >out

$CMP -s out ok