summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-14 21:12:47 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:27 -0500
commitcc5649f1bd94bfcd5a346ccf56c73db73c358cd3 (patch)
tree0749d52968f63f269223160d997e3aa44c604bde /tests
parent18abc5a0e644d76fe0b5c48711f3609fa70138f8 (diff)
refactor cxx_multiple_scanners test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/cxx_multiple_scanners.txt (renamed from tests/test-c++-multiple-scanners/test.input)0
-rw-r--r--tests/cxx_multiple_scanners_1.ll (renamed from tests/test-c++-multiple-scanners/scanner-1.l)2
-rw-r--r--tests/cxx_multiple_scanners_2.ll (renamed from tests/test-c++-multiple-scanners/scanner-2.l)2
-rw-r--r--tests/cxx_multiple_scanners_main.cc (renamed from tests/test-c++-multiple-scanners/main.cpp)0
-rw-r--r--tests/test-c++-multiple-scanners/.gitignore7
-rw-r--r--tests/test-c++-multiple-scanners/Makefile.am53
8 files changed, 7 insertions, 62 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 363c9d1..bd9304c 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -28,6 +28,8 @@ ccl
ccl.c
cxx_basic
cxx_basic.cc
+cxx_multiple_scanners
+cxx_multiple_scanners_[12].cc
debug_nr
debug_nr.c
debug_r
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5691e0c..d22d5a2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,6 +39,7 @@ check_PROGRAMS = \
c_cxx_r \
ccl \
cxx_basic \
+ cxx_multiple_scanners \
debug_nr \
debug_r \
extended \
@@ -69,6 +70,7 @@ c_cxx_nr_SOURCES = c_cxx_nr.lll
c_cxx_r_SOURCES = c_cxx_r.lll
ccl_SOURCES = ccl.l
cxx_basic_SOURCES = cxx_basic.ll
+cxx_multiple_scanners_SOURCES = cxx_multiple_scanners_main.cc cxx_multiple_scanners_1.ll cxx_multiple_scanners_2.ll
debug_nr_SOURCES = debug_nr.l
debug_r_SOURCES = debug_r.l
extended_SOURCES = extended.l
@@ -120,6 +122,7 @@ basic_nr.txt \
c_cxx_r.txt \
ccl.txt \
cxx_basic.txt \
+ cxx_multiple_scanners.txt \
debug_nr.txt \
debug_r.txt \
extended.txt \
diff --git a/tests/test-c++-multiple-scanners/test.input b/tests/cxx_multiple_scanners.txt
index 08498fa..08498fa 100644
--- a/tests/test-c++-multiple-scanners/test.input
+++ b/tests/cxx_multiple_scanners.txt
diff --git a/tests/test-c++-multiple-scanners/scanner-1.l b/tests/cxx_multiple_scanners_1.ll
index 38cc5d7..f4adb9d 100644
--- a/tests/test-c++-multiple-scanners/scanner-1.l
+++ b/tests/cxx_multiple_scanners_1.ll
@@ -24,7 +24,7 @@
%}
-%option 8bit outfile="scanner-1.cpp" prefix="S1_"
+%option 8bit prefix="S1_"
%option nounput nomain noyywrap
%option warn stack noyy_top_state
diff --git a/tests/test-c++-multiple-scanners/scanner-2.l b/tests/cxx_multiple_scanners_2.ll
index 15faf26..d84c530 100644
--- a/tests/test-c++-multiple-scanners/scanner-2.l
+++ b/tests/cxx_multiple_scanners_2.ll
@@ -24,7 +24,7 @@
%}
-%option 8bit outfile="scanner-2.cpp" prefix="S2_"
+%option 8bit prefix="S2_"
%option nounput nomain
%option warn stack noyy_top_state
diff --git a/tests/test-c++-multiple-scanners/main.cpp b/tests/cxx_multiple_scanners_main.cc
index 08fe2c1..08fe2c1 100644
--- a/tests/test-c++-multiple-scanners/main.cpp
+++ b/tests/cxx_multiple_scanners_main.cc
diff --git a/tests/test-c++-multiple-scanners/.gitignore b/tests/test-c++-multiple-scanners/.gitignore
deleted file mode 100644
index ed9376c..0000000
--- a/tests/test-c++-multiple-scanners/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-scanner-1.cpp
-scanner-2.cpp
-OUTPUT
-.deps
-test-c++-multiple-scanners
diff --git a/tests/test-c++-multiple-scanners/Makefile.am b/tests/test-c++-multiple-scanners/Makefile.am
deleted file mode 100644
index 9bcc9f8..0000000
--- a/tests/test-c++-multiple-scanners/Makefile.am
+++ /dev/null
@@ -1,53 +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.cpp test.input
-CLEANFILES = scanner-1.cpp $(testname)$(EXEEXT) OUTPUT $(OBJS) scanner-2.cpp
-OBJS = scanner-1.o scanner-2.o main.o
-
-AM_CXXFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-#LDFLAGS = $(top_srcdir)/libfl.a
-#YFLAGS = --defines --output=parser.c
-
-testname = test-c++-multiple-scanners
-
-scanner-1.cpp: $(srcdir)/scanner-1.l
- $(FLEX) -+ $(LFLAGS) $<
-
-scanner-2.cpp: $(srcdir)/scanner-2.l
- $(FLEX) -+ $(LFLAGS) $<
-
-$(testname)$(EXEEXT): $(OBJS)
- $(CXX) $(CXXFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
- $(builddir)/$(testname)$(EXEEXT) < $(srcdir)/test.input
-
-.cpp.o:
- $(CXX) -c -o $@ $(AM_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS) $<
-
-main.o: scanner-1.h scanner-2.h
-scanner-1.h: scanner-1.cpp
-scanner-2.h: scanner-2.cpp