summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjohn43 <john43>2006-03-21 20:58:39 +0000
committerjohn43 <john43>2006-03-21 20:58:39 +0000
commit74aa347ed7e32ef96608eddf6602a22aaaf6115b (patch)
treee91607a0b79e97b0be4168aebd584475b361299e /tests
parent82215be99f7a38bb22f3bef4ef1f85474b68f229 (diff)
downloadflex-74aa347ed7e32ef96608eddf6602a22aaaf6115b.tar.gz
Removed m4 from test-reject
Diffstat (limited to 'tests')
-rw-r--r--tests/test-reject/Makefile.am13
-rw-r--r--tests/test-reject/scanner.l15
2 files changed, 18 insertions, 10 deletions
diff --git a/tests/test-reject/Makefile.am b/tests/test-reject/Makefile.am
index 2a9c3e2..8fe5d7c 100644
--- a/tests/test-reject/Makefile.am
+++ b/tests/test-reject/Makefile.am
@@ -65,5 +65,16 @@ test: $(tests)
./$(testname)-ver$(EXEEXT) $(testname)-ver.tables < $(srcdir)/test.input
./$(testname)-ser$(EXEEXT) $(testname)-ser.tables < $(srcdir)/test.input
-.c.o:
+test-reject-nr.o: test-reject-nr.c
$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+
+test-reject-ver.o: test-reject-ver.c
+ $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $<
+
+test-reject-ser.o: test-reject-ser.c
+ $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_HAS_TABLES_EXTERNAL $(CFLAGS) $<
+
+test-reject-r.o: test-reject-r.c
+ $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) -DTEST_IS_REENTRANT $(CFLAGS) $<
+
+
diff --git a/tests/test-reject/scanner.l b/tests/test-reject/scanner.l
index a90a1fa..25dab60 100644
--- a/tests/test-reject/scanner.l
+++ b/tests/test-reject/scanner.l
@@ -46,13 +46,11 @@ int main ( int argc, char** argv )
void *yyscanner=0;
M4_YY_DECL_GUTS_VAR();
-m4_ifdef( [[M4_YY_REENTRANT]],
-[[
+#ifdef TEST_IS_REENTRANT
yylex_init(&yyscanner);
-]])
+#endif
-m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
-[[
+#ifdef TEST_HAS_TABLES_EXTERNAL
if((fp = fopen(argv[1],"r"))== NULL)
yy_fatal_error("could not open tables file for reading" M4_YY_CALL_LAST_ARG);
@@ -60,7 +58,7 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
yy_fatal_error("yytables_fload returned < 0" M4_YY_CALL_LAST_ARG);
if(M4_YY_TABLES_VERIFY)
exit(0);
-]])
+#endif
if(argc > 2){
if((fp = fopen(argv[2],"r"))== NULL)
@@ -70,10 +68,9 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
while(yylex(M4_YY_CALL_ONLY_ARG) != 0)
;
-m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
-[[
+#ifdef TEST_HAS_TABLES_EXTERNAL
yytables_destroy(M4_YY_CALL_ONLY_ARG);
-]])
+#endif
yylex_destroy(M4_YY_CALL_ONLY_ARG);
if(argc < 0) /* silence the compiler */