diff options
Diffstat (limited to 'tests/gentest/ifdef.1.test')
-rwxr-xr-x | tests/gentest/ifdef.1.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/gentest/ifdef.1.test b/tests/gentest/ifdef.1.test new file mode 100755 index 00000000..fb9951c7 --- /dev/null +++ b/tests/gentest/ifdef.1.test @@ -0,0 +1,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 + |