aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-22 20:30:10 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-22 20:32:39 +0300
commit24f55db22433621dc80a068583b4bf8886ae2603 (patch)
tree333a79ccf64bcb706780ac1d2807fa2be20b3d4e /tests
parent4a994c621995aafa110caa26114acb75f6ad76ed (diff)
downloadgrecs-24f55db22433621dc80a068583b4bf8886ae2603.tar.gz
grecs-24f55db22433621dc80a068583b4bf8886ae2603.tar.bz2
bind lexer: bugfix.
* src/bind-lex.l: Fix comment starter rule to take precedence over the identifier rule. * tests/bind00.at: New testcase. * tests/Makefile.am: Add new testcase. * tests/testsuite.at: Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/bind00.at34
-rw-r--r--tests/testsuite.at2
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1b47712..7089830 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -53,6 +53,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(top_srcdir)/@GRECS_SUBDIR@/am
## ------------ ##
TESTSUITE_AT = \
+ bind00.at\
cfhelp.at\
format00.at\
format01.at\
diff --git a/tests/bind00.at b/tests/bind00.at
new file mode 100644
index 0000000..28531c0
--- /dev/null
+++ b/tests/bind00.at
@@ -0,0 +1,34 @@
+# This file is part of grecs -*- Autotest -*-
+# Copyright (C) 2011 Sergey Poznyakoff
+#
+# Grecs is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Grecs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([C comments in BIND-style parser])
+AT_KEYWORDS([parser bind bind00])
+
+GRECS_TEST([
+zone "foo" {
+ type delegation-only;
+};
+
+/*zone "net" {
+ type delegation-only;
+};*/
+],
+[gcffmt -type=bind],
+[0],
+[.zone="foo".type: "delegation-only"
+])
+
+AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 5b4c9a4..4cad0d2 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -79,4 +79,6 @@ m4_include([parser-meta1.at])
m4_include([vercmp.at])
+m4_include([bind00.at])
+
# End of testsuite.at

Return to:

Send suggestions and report system problems to the System administrator.