diff options
author | Will Estes <westes575@gmail.com> | 2014-06-12 16:26:54 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-11-12 05:14:27 -0500 |
commit | 286625e8ea9431a6c94827204d1667f14542490d (patch) | |
tree | fe444847577b3d8f31a1824e22fe1f4b8cd4e6b9 | |
parent | a3a27a3cd941f0cd4ef292292e0018c60a454f97 (diff) |
refactor noansi_nr for new test suite layout
-rw-r--r-- | tests/.gitignore | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 9 | ||||
-rw-r--r-- | tests/noansi_nr.l (renamed from tests/test-noansi-nr/scanner.l) | 2 | ||||
-rw-r--r-- | tests/noansi_nr.txt (renamed from tests/test-noansi-nr/test.input) | 0 | ||||
-rw-r--r-- | tests/test-noansi-nr/.gitignore | 7 | ||||
-rw-r--r-- | tests/test-noansi-nr/Makefile.am | 48 |
6 files changed, 9 insertions, 59 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index d54f8fe..bba132e 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -36,3 +36,5 @@ mem_nr mem_nr.c mem_r mem_r.c +noansi_nr +noansi_nr.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 8589317..e5321ec 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -42,8 +42,8 @@ check_PROGRAMS = \ header_nr \ header_r \ mem_nr \ - mem_r - + mem_r \ + noansi_nr alloc_extra_SOURCES = alloc_extra.l array_nr_SOURCES = array_nr.l @@ -61,6 +61,7 @@ header_nr_SOURCES = header_nr_scanner.l header_nr_main.c header_r_SOURCES = header_r_scanner.l header_r_main.c mem_nr_SOURCES = mem_nr.l mem_r_SOURCES = mem_r.l +noansi_nr_SOURCES = noansi_nr.l BUILT_SOURCES = \ bison_nr_scanner.h \ @@ -95,7 +96,9 @@ basic_nr.txt \ header_r_scanner.h \ header_r.txt \ mem_nr.txt \ - mem_r.txt + mem_r.txt \ + noansi_nr.txt + # specify how to process .l files in order to test the flex built by make all diff --git a/tests/test-noansi-nr/scanner.l b/tests/noansi_nr.l index 4afc8c2..07f19cf 100644 --- a/tests/test-noansi-nr/scanner.l +++ b/tests/noansi_nr.l @@ -35,7 +35,7 @@ #include "config.h" %} -%option prefix="test" outfile="scanner.c" +%option prefix="test" %option nounput noyywrap noyylineno warn nodefault %option noansi-prototypes noansi-definitions diff --git a/tests/test-noansi-nr/test.input b/tests/noansi_nr.txt index 642e0fb..642e0fb 100644 --- a/tests/test-noansi-nr/test.input +++ b/tests/noansi_nr.txt diff --git a/tests/test-noansi-nr/.gitignore b/tests/test-noansi-nr/.gitignore deleted file mode 100644 index 1b47d0a..0000000 --- a/tests/test-noansi-nr/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -parser.c -parser.h -scanner.c -test-noansi-nr -OUTPUT -Makefile.in diff --git a/tests/test-noansi-nr/Makefile.am b/tests/test-noansi-nr/Makefile.am deleted file mode 100644 index a2a327e..0000000 --- a/tests/test-noansi-nr/Makefile.am +++ /dev/null @@ -1,48 +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 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 -#YFLAGS = --defines --output=parser.c - -testname = test-noansi-nr - -scanner.c: $(srcdir)/scanner.l - $(FLEX) $< - -parser.c: $(srcdir)/parser.y - $(BISON) $(YFLAGS) $< - -$(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) $< |