summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-07-01 20:56:44 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:28 -0500
commitdd7eda5be09771a831a80215e0e44dd0c47823c2 (patch)
treeb91ee0767fb9ff1ced43a689215756c9d52d7dae
parent7442349daba3dc8f427f6f5c17f9651af930a2a8 (diff)
refactor lineno_r test for new test suite layout
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/lineno_r.l (renamed from tests/test-lineno-r/scanner.l)2
-rw-r--r--tests/lineno_r.one.txt (renamed from tests/test-lineno-r/test.input)0
-rw-r--r--tests/test-lineno-r/.gitignore8
-rw-r--r--tests/test-lineno-r/Makefile.am45
6 files changed, 7 insertions, 55 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 853a1a8..618c6af 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -51,6 +51,8 @@ include_by_reentrant.direct
include_by_reentrant.direct.c
lineno_nr.one
lineno_nr.c
+lineno_r.one
+lineno_r.c
mem_nr
mem_nr.c
mem_r
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5847359..03fd1a3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -114,7 +114,8 @@ PTHREAD_TESTS = \
pthread.pthread
ONE_TESTS = \
- lineno_nr.one
+ lineno_nr.one \
+ lineno_r.one
alloc_extra_SOURCES = alloc_extra.l
array_nr_SOURCES = array_nr.l
@@ -139,6 +140,7 @@ include_by_buffer_direct_SOURCES = include_by_buffer.direct.l
include_by_push_direct_SOURCES = include_by_push.direct.l
include_by_reentrant_direct_SOURCES = include_by_reentrant.direct.l
lineno_nr_one_SOURCES = lineno_nr.l
+lineno_r_one_SOURCES = lineno_r.l
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
@@ -222,6 +224,7 @@ basic_nr.txt \
include_by_reentrant.direct_2.txt \
include_by_reentrant.direct_3.txt \
lineno_nr.one.txt \
+ lineno_r.one.txt \
mem_nr.txt \
mem_r.txt \
noansi_nr.txt \
diff --git a/tests/test-lineno-r/scanner.l b/tests/lineno_r.l
index 8933f5f..4132ed3 100644
--- a/tests/test-lineno-r/scanner.l
+++ b/tests/lineno_r.l
@@ -34,7 +34,7 @@
%}
-%option 8bit outfile="scanner.c" prefix="test"
+%option 8bit prefix="test"
%option nounput nomain noyywrap yylineno reentrant
%option warn
diff --git a/tests/test-lineno-r/test.input b/tests/lineno_r.one.txt
index c1eb961..c1eb961 100644
--- a/tests/test-lineno-r/test.input
+++ b/tests/lineno_r.one.txt
diff --git a/tests/test-lineno-r/.gitignore b/tests/test-lineno-r/.gitignore
deleted file mode 100644
index 9c9f4d0..0000000
--- a/tests/test-lineno-r/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-Makefile.in
-parser.c
-parser.h
-scanner.c
-test-lineno-r
-OUTPUT
-.deps
diff --git a/tests/test-lineno-r/Makefile.am b/tests/test-lineno-r/Makefile.am
deleted file mode 100644
index 8ded4b3..0000000
--- a/tests/test-lineno-r/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 test.input
-CLEANFILES = scanner.c $(testname)$(EXEEXT) OUTPUT $(OBJS)
-OBJS = scanner.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-
-testname = test-lineno-r
-
-scanner.c: $(srcdir)/scanner.l
- $(FLEX) $(LFLAGS) $<
-
-
-$(testname)$(EXEEXT): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
- test `./$(testname)$(EXEEXT) < $(srcdir)/test.input` -eq \
- `./$(testname)$(EXEEXT) 1 < $(srcdir)/test.input` || exit 1
-
-.c.o:
- $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<