]> granicus.if.org Git - flex/commitdiff
refactor array-r test for new test suite layout
authorWill Estes <westes575@gmail.com>
Sun, 1 Jun 2014 23:59:18 +0000 (19:59 -0400)
committerWill Estes <westes575@gmail.com>
Wed, 12 Nov 2014 10:14:26 +0000 (05:14 -0500)
tests/.gitignore
tests/Makefile.am
tests/array-r.l [moved from tests/test-array-r/scanner.l with 96% similarity]
tests/array-r.txt [moved from tests/test-array-r/test.input with 100% similarity]
tests/test-array-r/.gitignore [deleted file]
tests/test-array-r/Makefile.am [deleted file]

index 3609b85e873b343ecd15277632612dd5df55b44f..2f3113abf1199381bf0764ee2cf1c32426e19c23 100644 (file)
@@ -4,6 +4,8 @@ alloc-extra
 alloc-extra.c
 array-nr
 array-nr.c
+array-r
+array-r.c
 basic-nr
 basic-nr.c
 basic-r
index 47424355ba2b5cd1270041f35c5756ede63c06eb..63bbadd4aeb24924bb0ea93140d15c61e82a6271 100644 (file)
@@ -27,11 +27,13 @@ AM_LOG_FLAGS = $(srcdir)
 check_PROGRAMS = \
        alloc-extra \
        array-nr \
+       array-r \
        basic-nr \
        basic-r
 
 alloc_extra_SOURCES = alloc-extra.l
 array_nr_SOURCES = array-nr.l
+array_r_SOURCES = array-r.l
 basic_nr_SOURCES = basic-nr.l
 basic_r_SOURCES = basic-r.l
 
@@ -40,6 +42,7 @@ EXTRA_DIST = \
        testwrapper.sh \
        alloc-extra.txt \
        array-nr.txt \
+       array-r.txt \
 basic-nr.txt \
        basic-r.txt
 
similarity index 96%
rename from tests/test-array-r/scanner.l
rename to tests/array-r.l
index 2d4c1b19b5bc2c0c2edc956d6df950912e099990..02852407d8b4f07d108bea15cfb02b6af7609537 100644 (file)
@@ -30,7 +30,7 @@
 
 %}
 
-%option 8bit outfile="scanner.c" prefix="test"
+%option 8bit prefix="test"
 %option nounput nomain noyywrap 
 %option warn array reentrant
 
diff --git a/tests/test-array-r/.gitignore b/tests/test-array-r/.gitignore
deleted file mode 100644 (file)
index 267397d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-parser.c
-parser.h
-scanner.c
-test-array-r
-OUTPUT
-Makefile.in
diff --git a/tests/test-array-r/Makefile.am b/tests/test-array-r/Makefile.am
deleted file mode 100644 (file)
index b60c917..0000000
+++ /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)
-#LDFLAGS = $(top_srcdir)/libfl.a 
-#YFLAGS = --defines --output=parser.c
-
-testname = test-array-r
-
-scanner.c: $(srcdir)/scanner.l
-       $(FLEX) $<
-
-$(testname)$(EXEEXT): $(OBJS)
-       $(CC) $(CFLAGS) -o $@ $(LDFLAGS) $(OBJS) $(LOADLIBES)
-
-test: $(testname)$(EXEEXT)
-       ./$(testname)$(EXEEXT) < $(srcdir)/test.input
-
-.c.o:
-       $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<