diff options
author | Will Estes <westes575@gmail.com> | 2014-06-14 14:41:32 -0400 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2014-11-12 05:14:27 -0500 |
commit | 2d9cde08c72ac7b2cef908c3d006984a79bd997c (patch) | |
tree | 1af178ff238f449d92891132b1fdc24354ae01ce /tests | |
parent | 435b336b2fbf2f4412fd4a5042afb095a3cf40e4 (diff) |
refactor posixly_correct test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rw-r--r-- | tests/posixly_correct.l (renamed from tests/test-posixly-correct/scanner.l) | 2 | ||||
-rw-r--r-- | tests/test-posixly-correct/.gitignore | 9 | ||||
-rw-r--r-- | tests/test-posixly-correct/Makefile.am | 45 |
5 files changed, 8 insertions, 55 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index ba408e9..2576821 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -42,6 +42,8 @@ noansi_r noansi_r.c posix posix.c +posixly_correct +posixly_correct.c prefix_nr prefix_nr.c prefix_r diff --git a/tests/Makefile.am b/tests/Makefile.am index 6e706b3..c2e943b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,6 +46,7 @@ check_PROGRAMS = \ noansi_nr \ noansi_r \ posix \ + posixly_correct \ prefix_nr \ prefix_r \ string_nr \ @@ -72,6 +73,7 @@ mem_r_SOURCES = mem_r.l noansi_nr_SOURCES = noansi_nr.l noansi_r_SOURCES = noansi_r.l posix_SOURCES = posix.l +posixly_correct_SOURCES = posixly_correct.l prefix_nr_SOURCES = prefix_nr.l prefix_r_SOURCES = prefix_r.l string_nr_SOURCES = string_nr.l @@ -144,5 +146,8 @@ header_nr_scanner.h: header_nr_scanner.c header_r_main$(objext): header_r_scanner.h header_r_scanner.h: header_r_scanner.c +posixly_correct.c: posixly_correct.l + POSIXLY_CORRECT=1 $(FLEX) -o $@ $< + top_main$(objext): top.h top.h: top.c diff --git a/tests/test-posixly-correct/scanner.l b/tests/posixly_correct.l index 20912df..7999fbf 100644 --- a/tests/test-posixly-correct/scanner.l +++ b/tests/posixly_correct.l @@ -40,7 +40,7 @@ int tests_ok[NUM_TESTS] = { 0 }; %} -%option 8bit outfile="scanner.c" prefix="test" +%option 8bit prefix="test" %option nounput nomain noyywrap %option warn diff --git a/tests/test-posixly-correct/.gitignore b/tests/test-posixly-correct/.gitignore deleted file mode 100644 index d28d3cb..0000000 --- a/tests/test-posixly-correct/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile -Makefile.in -parser.c -parser.h -scanner.c -TEMPLATE -OUTPUT -.deps -test-posixly-correct diff --git a/tests/test-posixly-correct/Makefile.am b/tests/test-posixly-correct/Makefile.am deleted file mode 100644 index 6821cf7..0000000 --- a/tests/test-posixly-correct/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 -CLEANFILES = scanner.c scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS) -OBJS = scanner.o - -AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -#LDFLAGS = $(top_srcdir)/libfl.a -#LFLAGS = --header="scanner.h" - -testname = test-posixly-correct - -scanner.c: $(srcdir)/scanner.l - POSIXLY_CORRECT=1 $(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) $< |