diff options
author | Will Estes <westes575@gmail.com> | 2014-06-12 16:31:25 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-11-12 05:14:27 -0500 |
commit | df3b400a3ef31476113afd55f33d8fd618b2f074 (patch) | |
tree | f815b01d43b5733e7e50d4b0d12a302c21f48ab1 /tests | |
parent | 286625e8ea9431a6c94827204d1667f14542490d (diff) |
refactor noansi_r test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rw-r--r-- | tests/noansi_r.l (renamed from tests/test-noansi-r/scanner.l) | 2 | ||||
-rw-r--r-- | tests/noansi_r.txt (renamed from tests/test-noansi-r/test.input) | 0 | ||||
-rw-r--r-- | tests/test-noansi-r/.gitignore | 7 | ||||
-rw-r--r-- | tests/test-noansi-r/Makefile.am | 48 |
6 files changed, 8 insertions, 58 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index bba132e..a7bb6f1 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -38,3 +38,5 @@ mem_r mem_r.c noansi_nr noansi_nr.c +noansi_r +noansi_r.c diff --git a/tests/Makefile.am b/tests/Makefile.am index e5321ec..0cf0cac 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -43,7 +43,8 @@ check_PROGRAMS = \ header_r \ mem_nr \ mem_r \ - noansi_nr + noansi_nr \ + noansi_r alloc_extra_SOURCES = alloc_extra.l array_nr_SOURCES = array_nr.l @@ -62,6 +63,7 @@ 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 +noansi_r_SOURCES = noansi_r.l BUILT_SOURCES = \ bison_nr_scanner.h \ @@ -97,7 +99,8 @@ basic_nr.txt \ header_r.txt \ mem_nr.txt \ mem_r.txt \ - noansi_nr.txt + noansi_nr.txt \ + noansi_r.txt # specify how to process .l files in order to test the flex built by make all diff --git a/tests/test-noansi-r/scanner.l b/tests/noansi_r.l index e0b3ffb..172cec6 100644 --- a/tests/test-noansi-r/scanner.l +++ b/tests/noansi_r.l @@ -33,7 +33,7 @@ #include "config.h" %} -%option prefix="test" outfile="scanner.c" +%option prefix="test" %option nounput noyywrap noyylineno warn nodefault %option reentrant %option noansi-definitions noansi-prototypes diff --git a/tests/test-noansi-r/test.input b/tests/noansi_r.txt index 2160628..2160628 100644 --- a/tests/test-noansi-r/test.input +++ b/tests/noansi_r.txt diff --git a/tests/test-noansi-r/.gitignore b/tests/test-noansi-r/.gitignore deleted file mode 100644 index 40ede49..0000000 --- a/tests/test-noansi-r/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -parser.c -parser.h -scanner.c -test-noansi-r -OUTPUT -Makefile.in diff --git a/tests/test-noansi-r/Makefile.am b/tests/test-noansi-r/Makefile.am deleted file mode 100644 index ec123fe..0000000 --- a/tests/test-noansi-r/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-r - -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) $< |