diff options
author | Will Estes <westes575@gmail.com> | 2014-07-01 21:02:30 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-11-12 05:14:28 -0500 |
commit | 9146975ee4f9ebb119aa759a01eb520c17db8b0f (patch) | |
tree | 18c3256fb955533a5c5b39ac9d140710f312f7c8 | |
parent | dd7eda5be09771a831a80215e0e44dd0c47823c2 (diff) |
refactor lineno_trailing test for new test suite layout
-rw-r--r-- | tests/.gitignore | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rw-r--r-- | tests/lineno_trailing.l (renamed from tests/test-lineno-trailing/scanner.l) | 2 | ||||
-rw-r--r-- | tests/lineno_trailing.one.txt (renamed from tests/test-lineno-trailing/test.input) | 0 | ||||
-rw-r--r-- | tests/test-lineno-trailing/.gitignore | 8 | ||||
-rw-r--r-- | tests/test-lineno-trailing/Makefile.am | 45 |
6 files changed, 7 insertions, 55 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index 618c6af..fe6a602 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -53,6 +53,8 @@ lineno_nr.one lineno_nr.c lineno_r.one lineno_r.c +lineno_trailing.one +lineno_trailing.c mem_nr mem_nr.c mem_r diff --git a/tests/Makefile.am b/tests/Makefile.am index 03fd1a3..ea94ad8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -115,7 +115,8 @@ PTHREAD_TESTS = \ ONE_TESTS = \ lineno_nr.one \ - lineno_r.one + lineno_r.one \ + lineno_trailing.one alloc_extra_SOURCES = alloc_extra.l array_nr_SOURCES = array_nr.l @@ -141,6 +142,7 @@ 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 +lineno_trailing_one_SOURCES = lineno_trailing.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 @@ -225,6 +227,7 @@ basic_nr.txt \ include_by_reentrant.direct_3.txt \ lineno_nr.one.txt \ lineno_r.one.txt \ + lineno_trailing.one.txt \ mem_nr.txt \ mem_r.txt \ noansi_nr.txt \ diff --git a/tests/test-lineno-trailing/scanner.l b/tests/lineno_trailing.l index 20d3c8a..9e83dab 100644 --- a/tests/test-lineno-trailing/scanner.l +++ b/tests/lineno_trailing.l @@ -34,7 +34,7 @@ %} -%option 8bit outfile="scanner.c" prefix="test" +%option 8bit prefix="test" %option nounput nomain noyywrap yylineno %option warn diff --git a/tests/test-lineno-trailing/test.input b/tests/lineno_trailing.one.txt index 201164d..201164d 100644 --- a/tests/test-lineno-trailing/test.input +++ b/tests/lineno_trailing.one.txt diff --git a/tests/test-lineno-trailing/.gitignore b/tests/test-lineno-trailing/.gitignore deleted file mode 100644 index 84b3fa9..0000000 --- a/tests/test-lineno-trailing/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -Makefile -Makefile.in -parser.c -parser.h -scanner.c -test-lineno-trailing -OUTPUT -.deps diff --git a/tests/test-lineno-trailing/Makefile.am b/tests/test-lineno-trailing/Makefile.am deleted file mode 100644 index bb303c3..0000000 --- a/tests/test-lineno-trailing/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-trailing - -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) $< |