]> granicus.if.org Git - flex/commitdiff
refactor string_r test for new test suite layout
authorWill Estes <westes575@gmail.com>
Sat, 14 Jun 2014 15:25:43 +0000 (11:25 -0400)
committerWill Estes <westes575@gmail.com>
Wed, 12 Nov 2014 10:14:27 +0000 (05:14 -0500)
tests/.gitignore
tests/Makefile.am
tests/string_r.l [moved from tests/test-string-r/scanner.l with 98% similarity]
tests/test-string-r/.gitignore [deleted file]
tests/test-string-r/Makefile.am [deleted file]

index 33527c0e95f7f59b718e428b42147d27ebc9f121..28be059ee8b8880446e4be5522304c64ebb74ef4 100644 (file)
@@ -48,3 +48,5 @@ prefix_r
 prefix_r.c
 string_nr
 string_nr.c
+string_r
+string_r.c
index aeeba0f2a7c4fcc7f35d6219514d3757b5592bb9..a749761c42945e81634e3f13a886ac750fe8127b 100644 (file)
@@ -48,7 +48,8 @@ check_PROGRAMS = \
        posix \
        prefix_nr \
        prefix_r \
-       string_nr
+       string_nr \
+string_r
 
 alloc_extra_SOURCES = alloc_extra.l
 array_nr_SOURCES = array_nr.l
@@ -72,6 +73,7 @@ posix_SOURCES = posix.l
 prefix_nr_SOURCES = prefix_nr.l
 prefix_r_SOURCES = prefix_r.l
 string_nr_SOURCES = string_nr.l
+string_r_SOURCES = string_r.l
 
 BUILT_SOURCES = \
        bison_nr_scanner.h \
similarity index 98%
rename from tests/test-string-r/scanner.l
rename to tests/string_r.l
index 6b594d77574754c8fca1508f01e0ce6bb21a3417..9528015fd0fa8167ca9f2d5dfd2bfcdd8909eafc 100644 (file)
@@ -32,7 +32,7 @@
 
 %}
 
-%option 8bit outfile="scanner.c" prefix="test"
+%option 8bit prefix="test"
 %option nounput nomain nodefault noyywrap 
 %option warn reentrant
 
diff --git a/tests/test-string-r/.gitignore b/tests/test-string-r/.gitignore
deleted file mode 100644 (file)
index 6dbb225..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-parser.c
-parser.h
-scanner.c
-test-string-r
-OUTPUT
diff --git a/tests/test-string-r/Makefile.am b/tests/test-string-r/Makefile.am
deleted file mode 100644 (file)
index ec3d4da..0000000
+++ /dev/null
@@ -1,46 +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 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-string-r
-
-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) $<