summaryrefslogtreecommitdiff
path: root/tests/specflg8.test
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-07-03 15:45:02 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-07-03 15:45:02 +0200
commit12803f06863ba563237ab2404e28897c07f8b757 (patch)
tree373774731c05eef4067980bbde68268b6d101b5c /tests/specflg8.test
parent1b5e0246957acb4987e12b48d6ffbe9166cb8f82 (diff)
parenta44667dce47afd200d990910f8e8a966276be756 (diff)
downloadautomake-12803f06863ba563237ab2404e28897c07f8b757.tar.gz
Merge branch 'maint'
* maint: docs, tests: synchronize examples from docs to tests
Diffstat (limited to 'tests/specflg8.test')
-rwxr-xr-xtests/specflg8.test33
1 files changed, 16 insertions, 17 deletions
diff --git a/tests/specflg8.test b/tests/specflg8.test
index 1defd0bef..d2c6714fb 100755
--- a/tests/specflg8.test
+++ b/tests/specflg8.test
@@ -32,25 +32,18 @@ END
# different flags.
cat > Makefile.am << 'END'
-FALSESOURCE = false.c
+TRUESOURCE = true.c
bin_PROGRAMS = false true
-true_SOURCES = $(FALSESOURCE)
-true_CPPFLAGS = -DAM_TRUE
-false_SOURCES = $(FALSESOURCE)
-false_CPPFLAGS = -DAM_FALSE
+true_SOURCES = $(TRUESOURCE)
+true_CPPFLAGS = -DEXIT_CODE=0
+false_SOURCES = $(TRUESOURCE)
+false_CPPFLAGS = -DEXIT_CODE=1
END
-cat > false.c << 'END'
-#include <stdio.h>
-int
-main (int argc, char *argv[])
+cat > true.c << 'END'
+int main (void)
{
-#ifdef AM_TRUE
- puts ("true");
-#else
- puts ("false");
-#endif
- return 0;
+ return EXIT_CODE;
}
END
@@ -60,5 +53,11 @@ $AUTOMAKE -a
./configure
$MAKE
-./true | grep true
-./false | grep false
+
+./true
+./false && Exit 1
+
+test -f ./true-true.o
+test -f ./true-true.o
+
+: