summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-15 19:23:53 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:27 -0500
commit323c11e8aef18a09aa40d11a4fabf6b8c787d782 (patch)
treefe54415f0d376717315fb618c7f5ad6480ab8616 /tests
parentcc5649f1bd94bfcd5a346ccf56c73db73c358cd3 (diff)
refactor multiple_scanners_nr test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am10
-rw-r--r--tests/multiple_scanners_nr_1.l (renamed from tests/test-multiple-scanners-nr/scanner-1.l)4
-rw-r--r--tests/multiple_scanners_nr_2.l (renamed from tests/test-multiple-scanners-nr/scanner-2.l)4
-rw-r--r--tests/multiple_scanners_nr_main.c (renamed from tests/test-multiple-scanners-nr/main.c)4
-rw-r--r--tests/test-multiple-scanners-nr/.gitignore8
-rw-r--r--tests/test-multiple-scanners-nr/Makefile.am54
7 files changed, 18 insertions, 68 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index bd9304c..78d46c2 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -44,6 +44,8 @@ mem_nr
mem_nr.c
mem_r
mem_r.c
+multiple_scanners_nr
+multiple_scanners_nr_[12].[ch]
noansi_nr
noansi_nr.c
noansi_r
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d22d5a2..d785e0a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,6 +47,7 @@ check_PROGRAMS = \
header_r \
mem_nr \
mem_r \
+ multiple_scanners_nr \
noansi_nr \
noansi_r \
posix \
@@ -78,6 +79,7 @@ header_nr_SOURCES = header_nr_scanner.l header_nr_main.c
header_r_SOURCES = header_r_scanner.l header_r_main.c
mem_nr_SOURCES = mem_nr.l
mem_r_SOURCES = mem_r.l
+multiple_scanners_nr_SOURCES = multiple_scanners_nr_main.c multiple_scanners_nr_1.l multiple_scanners_nr_2.l
noansi_nr_SOURCES = noansi_nr.l
noansi_r_SOURCES = noansi_r.l
posix_SOURCES = posix.l
@@ -100,6 +102,8 @@ BUILT_SOURCES = \
c_cxx_r.cc \
header_nr_scanner.h \
header_r_scanner.h \
+ multiple_scanners_nr_1.h \
+ multiple_scanners_nr_2.h \
top.h
EXTRA_DIST = \
@@ -133,6 +137,8 @@ basic_nr.txt \
mem_nr.txt \
mem_r.txt \
noansi_nr.txt \
+ multiple_scanners_nr_1.h \
+ multiple_scanners_nr_2.h \
noansi_r.txt \
prefix_nr.txt \
prefix_r.txt \
@@ -171,6 +177,10 @@ header_nr_scanner.h: header_nr_scanner.c
header_r_main$(objext): header_r_scanner.h
header_r_scanner.h: header_r_scanner.c
+multiple_scanners_nr_main.$(OBJEXT): multiple_scanners_nr_1.h multiple_scanners_nr_2.h
+multiple_scanners_nr_1.h: multiple_scanners_nr_1.c
+multiple_scanners_nr_2.h: multiple_scanners_nr_2.c
+
posixly_correct.c: posixly_correct.l
POSIXLY_CORRECT=1 $(FLEX) -o $@ $<
diff --git a/tests/test-multiple-scanners-nr/scanner-1.l b/tests/multiple_scanners_nr_1.l
index 0d520b1..5e848c2 100644
--- a/tests/test-multiple-scanners-nr/scanner-1.l
+++ b/tests/multiple_scanners_nr_1.l
@@ -29,8 +29,8 @@
%}
-%option header="scanner-1.h"
-%option 8bit outfile="scanner-1.c" prefix="S1_"
+%option header="multiple_scanners_nr_1.h"
+%option 8bit prefix="S1_"
%option nounput nomain noyywrap
%option warn stack noyy_top_state
diff --git a/tests/test-multiple-scanners-nr/scanner-2.l b/tests/multiple_scanners_nr_2.l
index 88bd799..5a9ac99 100644
--- a/tests/test-multiple-scanners-nr/scanner-2.l
+++ b/tests/multiple_scanners_nr_2.l
@@ -29,8 +29,8 @@
%}
-%option header="scanner-2.h"
-%option 8bit outfile="scanner-2.c" prefix="S2_"
+%option header="multiple_scanners_nr_2.h"
+%option 8bit prefix="S2_"
%option nounput nomain noyywrap
%option warn stack noyy_top_state
diff --git a/tests/test-multiple-scanners-nr/main.c b/tests/multiple_scanners_nr_main.c
index a83bec6..3763dbc 100644
--- a/tests/test-multiple-scanners-nr/main.c
+++ b/tests/multiple_scanners_nr_main.c
@@ -21,8 +21,8 @@
* PURPOSE.
*/
-#include "scanner-1.h"
-#include "scanner-2.h"
+#include "multiple_scanners_nr_1.h"
+#include "multiple_scanners_nr_2.h"
int
main ( int argc, char** argv )
diff --git a/tests/test-multiple-scanners-nr/.gitignore b/tests/test-multiple-scanners-nr/.gitignore
deleted file mode 100644
index dfd4b07..0000000
--- a/tests/test-multiple-scanners-nr/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-Makefile.in
-scanner-1.c
-scanner-1.h
-scanner-2.c
-scanner-2.h
-test-multiple-scanners-nr
-OUTPUT
diff --git a/tests/test-multiple-scanners-nr/Makefile.am b/tests/test-multiple-scanners-nr/Makefile.am
deleted file mode 100644
index 950dd23..0000000
--- a/tests/test-multiple-scanners-nr/Makefile.am
+++ /dev/null
@@ -1,54 +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
-
-builddir = @builddir@
-
-EXTRA_DIST = scanner-1.l scanner-2.l main.c
-CLEANFILES = scanner-1.c scanner-1.h $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.c scanner-2.h
-OBJS = scanner-1.o scanner-2.o main.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(builddir)
-#LDFLAGS = $(top_srcdir)/libfl.a
-#YFLAGS = --defines --output=parser.c
-
-testname = test-multiple-scanners-nr
-
-scanner-1.c: $(srcdir)/scanner-1.l
- $(FLEX) $(LFLAGS) --header=scanner-1.h $<
-
-scanner-2.c: $(srcdir)/scanner-2.l
- $(FLEX) $(LFLAGS) --header=scanner-2.h $<
-
-$(testname)$(EXEEXT): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
- ./$(testname)$(EXEEXT)
-
-.c.o:
- $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
-
-main.o: scanner-1.h scanner-2.h
-scanner-1.h: scanner-1.c
-scanner-2.h: scanner-2.c