summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-04 16:15:42 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:26 -0500
commitccaa2785062dec7fe2d0ddc7a6a3f58b77e4c338 (patch)
tree6a0d8913c060e9f061b6378158a0fd042648f392 /tests
parent69d5f1065d19d1224cd244fb599636dc8d003c4a (diff)
refactor debug_nr test for new test suite layout
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore2
-rw-r--r--tests/Makefile.am9
-rw-r--r--tests/debug_nr.l (renamed from tests/test-debug-nr/scanner.l)2
-rw-r--r--tests/debug_nr.txt (renamed from tests/test-debug-nr/test.input)0
-rw-r--r--tests/test-debug-nr/.gitignore9
-rw-r--r--tests/test-debug-nr/Makefile.am44
6 files changed, 9 insertions, 57 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index a59cd3e..9fa9f29 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -22,3 +22,5 @@ bison_yylval_parser.[ch]
bison_yylval_scanner.[ch]
ccl
ccl.c
+debug_nr
+debug_nr.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7aaca1a..053f115 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -35,7 +35,8 @@ check_PROGRAMS = \
bison_nr \
bison_yylloc \
bison_yylval \
- ccl
+ ccl \
+ debug_nr
alloc_extra_SOURCES = alloc_extra.l
array_nr_SOURCES = array_nr.l
@@ -45,7 +46,8 @@ basic_r_SOURCES = basic_r.l
bison_nr_SOURCES = bison_nr_scanner.l bison_nr_parser.y bison_nr_main.c
bison_yylloc_SOURCES = bison_yylloc_scanner.l bison_yylloc_parser.y bison_yylloc_main.c
bison_yylval_SOURCES = bison_yylval_scanner.l bison_yylval_parser.y bison_yylval_main.c
-ccl_SOURCES = ccl.y
+ccl_SOURCES = ccl.l
+debug_nr_SOURCES = debug_nr.l
BUILT_SOURCES = \
bison_nr_scanner.h \
@@ -69,7 +71,8 @@ basic_nr.txt \
bison_yylloc.txt \
bison_yylval_scanner.h \
bison_yylval.txt \
- ccl.txt
+ ccl.txt \
+ debug_nr.txt
# specify how to process .l files in order to test the flex built by make all
diff --git a/tests/test-debug-nr/scanner.l b/tests/debug_nr.l
index 13d11d6..231a181 100644
--- a/tests/test-debug-nr/scanner.l
+++ b/tests/debug_nr.l
@@ -29,7 +29,7 @@
%}
-%option 8bit outfile="scanner.c" prefix="test"
+%option 8bit prefix="test"
%option nounput nomain noyywrap
%option warn debug
diff --git a/tests/test-debug-nr/test.input b/tests/debug_nr.txt
index 8d6476c..8d6476c 100644
--- a/tests/test-debug-nr/test.input
+++ b/tests/debug_nr.txt
diff --git a/tests/test-debug-nr/.gitignore b/tests/test-debug-nr/.gitignore
deleted file mode 100644
index 689066f..0000000
--- a/tests/test-debug-nr/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-parser.c
-parser.h
-scanner.c
-TEMPLATE
-OUTPUT
-.deps
-test-debug-nr
diff --git a/tests/test-debug-nr/Makefile.am b/tests/test-debug-nr/Makefile.am
deleted file mode 100644
index 8e4ae82..0000000
--- a/tests/test-debug-nr/Makefile.am
+++ /dev/null
@@ -1,44 +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 scanner.h $(testname)$(EXEEXT) OUTPUT $(OBJS)
-OBJS = scanner.o
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)
-#LDFLAGS = $(top_srcdir)/libfl.a
-
-testname = test-debug-nr
-
-scanner.c: $(srcdir)/scanner.l
- $(FLEX) $(LFLAGS) $<
-
-$(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) $<