summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-12 18:25:35 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:27 -0500
commit9334bcbe4a0533ed7fa05d81488af623161d46fd (patch)
treeb1b8069f867ef0d89d0ebb089e7f59762a18c1f1 /tests
parentdf3b400a3ef31476113afd55f33d8fd618b2f074 (diff)
refactor posix test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/posix.l (renamed from tests/test-posix/scanner.l)2
-rw-r--r--tests/test-posix/.gitignore9
-rw-r--r--tests/test-posix/Makefile.am45
5 files changed, 6 insertions, 57 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index a7bb6f1..7946446 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -40,3 +40,5 @@ noansi_nr
noansi_nr.c
noansi_r
noansi_r.c
+posix
+posix.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0cf0cac..144f56e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -44,7 +44,8 @@ check_PROGRAMS = \
mem_nr \
mem_r \
noansi_nr \
- noansi_r
+ noansi_r \
+ posix
alloc_extra_SOURCES = alloc_extra.l
array_nr_SOURCES = array_nr.l
@@ -64,6 +65,7 @@ mem_nr_SOURCES = mem_nr.l
mem_r_SOURCES = mem_r.l
noansi_nr_SOURCES = noansi_nr.l
noansi_r_SOURCES = noansi_r.l
+posix_SOURCES = posix.l
BUILT_SOURCES = \
bison_nr_scanner.h \
@@ -102,7 +104,6 @@ basic_nr.txt \
noansi_nr.txt \
noansi_r.txt
-
# specify how to process .l files in order to test the flex built by make all
FLEX = $(top_builddir)/src/flex
diff --git a/tests/test-posix/scanner.l b/tests/posix.l
index c6c0b51..a28a2e9 100644
--- a/tests/test-posix/scanner.l
+++ b/tests/posix.l
@@ -40,7 +40,7 @@ int tests_ok[NUM_TESTS] = { 0 };
%}
-%option 8bit outfile="scanner.c" prefix="test"
+%option 8bit prefix="test"
%option nounput nomain noyywrap
%option warn posix-compat
diff --git a/tests/test-posix/.gitignore b/tests/test-posix/.gitignore
deleted file mode 100644
index a36ae35..0000000
--- a/tests/test-posix/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-parser.c
-parser.h
-scanner.c
-TEMPLATE
-OUTPUT
-.deps
-test-posix
diff --git a/tests/test-posix/Makefile.am b/tests/test-posix/Makefile.am
deleted file mode 100644
index 2fd3271..0000000
--- a/tests/test-posix/Makefile.am
+++ /dev/null
@@ -1,45 +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
-CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
-OBJS = scanner.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-#LDFLAGS = $(top_srcdir)/libfl.a
-#LFLAGS = --header="scanner.h"
-
-testname = test-posix
-
-scanner.c: $(srcdir)/scanner.l
- $(FLEX) $(LFLAGS) $<
-
-$(testname)$(EXEEXT): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
- ./$(testname)$(EXEEXT)
-
-.c.o:
- $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<