summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-14 11:48:48 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:27 -0500
commit435b336b2fbf2f4412fd4a5042afb095a3cf40e4 (patch)
treec7dc96ef12a594640fd603d7d4d5e2febcaa3983 /tests
parenta0243585d226e5ce5d72bd21c31833517e55c26a (diff)
refactor yyextra test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/test-yyextra/.gitignore7
-rw-r--r--tests/test-yyextra/Makefile.am49
-rw-r--r--tests/yyextra.l (renamed from tests/test-yyextra/scanner.l)2
-rw-r--r--tests/yyextra.txt (renamed from tests/test-yyextra/test.input)0
6 files changed, 9 insertions, 59 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 5822381..ba408e9 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -52,3 +52,5 @@ string_r
string_r.c
top
top.[ch]
+yyextra
+yyextra.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9863ecd..6e706b3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -50,7 +50,8 @@ check_PROGRAMS = \
prefix_r \
string_nr \
string_r \
- top
+ top \
+ yyextra
alloc_extra_SOURCES = alloc_extra.l
array_nr_SOURCES = array_nr.l
@@ -76,6 +77,7 @@ prefix_r_SOURCES = prefix_r.l
string_nr_SOURCES = string_nr.l
string_r_SOURCES = string_r.l
top_SOURCES = top.l top_main.c
+yyextra_SOURCES = yyextra.l
BUILT_SOURCES = \
bison_nr_scanner.h \
@@ -116,7 +118,9 @@ basic_nr.txt \
noansi_r.txt \
prefix_nr.txt \
prefix_r.txt \
- top.txt
+ top.h \
+ top.txt \
+ yyextra.txt
# specify how to process .l files in order to test the flex built by make all
diff --git a/tests/test-yyextra/.gitignore b/tests/test-yyextra/.gitignore
deleted file mode 100644
index 7e4b915..0000000
--- a/tests/test-yyextra/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-parser.c
-parser.h
-scanner.c
-test-yyextra
-OUTPUT
diff --git a/tests/test-yyextra/Makefile.am b/tests/test-yyextra/Makefile.am
deleted file mode 100644
index d55f74e..0000000
--- a/tests/test-yyextra/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-# This file is part of flex.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-
-# Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE.
-
-
-FLEX = $(top_builddir)/flex
-
-EXTRA_DIST = scanner.l test.input
-CLEANFILES = scanner.c scanner.h parser.c parser.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
-OBJS = scanner.o # parser.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-#LDFLAGS = $(top_srcdir)/libfl.a
-#LFLAGS = --header="scanner.h"
-#YFLAGS = --defines --output=parser.c
-
-testname = test-yyextra
-
-scanner.c: $(srcdir)/scanner.l
- $(FLEX) $(LFLAGS) $<
-
-parser.c: $(srcdir)/parser.y
- $(BISON) $(YFLAGS) $<
-
-$(testname)$(EXEEXT): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
- ./$(testname)$(EXEEXT) < $(srcdir)/test.input
-
-.c.o:
- $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
diff --git a/tests/test-yyextra/scanner.l b/tests/yyextra.l
index baba52b..172d02d 100644
--- a/tests/test-yyextra/scanner.l
+++ b/tests/yyextra.l
@@ -47,7 +47,7 @@ static void append_char (char c, yyscan_t scanner );
%}
-%option 8bit outfile="scanner.c" prefix="test"
+%option 8bit prefix="test"
%option nounput nomain noyywrap nodefault
%option warn
%option reentrant
diff --git a/tests/test-yyextra/test.input b/tests/yyextra.txt
index 243df29..243df29 100644
--- a/tests/test-yyextra/test.input
+++ b/tests/yyextra.txt