aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-07-16 12:21:27 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-07-16 12:21:27 +0300
commit529fed25f92e04d694c30b3fc6bc8645e2703f4e (patch)
treec575001b35a43ba8f325bf7af60d7b9fb8b8b32a /tests/Makefile.am
parent6201e61fb932dbe6153f92ede836e07247d04b7c (diff)
downloadgrecs-529fed25f92e04d694c30b3fc6bc8645e2703f4e.tar.gz
grecs-529fed25f92e04d694c30b3fc6bc8645e2703f4e.tar.bz2
Disable adjacent string concatenation.
The adjacent string concatenation feature doesn't work well with multiple-argument statements. The common example (found in GNU pies) is the "env" statement: env "PATH=/sbin:$PATH" "PRELOAD=true" The intent was to pass it two arguments, but in fact they get concatenated into one. To control this, the grecs_parser_options variable is introduced. If it has the GRECS_OPTION_QUOTED_STRING_CONCAT bit set, adjacent string concatenation is enabled. By default it is disabled. The GRECS_OPTION_ADJUST_STRING_LOCATIONS bit controls the way the quoted sring locations are computed. If it is set, the beginning of the string is counted at the first character after the opening double quote, and its end at the character immediately preceding the closing double quote. Otherwise, both double-quote characters are included in the location (the default). The change is backward incompatible. * doc/grecs-syntax.texi: Update. * include/grecs/parser.h (grecs_adjust_string_locations): Remove. (grecs_parser_options): New extern. * src/grecs-lex.l: QSTRING is returned only if GRECS_OPTION_QUOTED_STRING_CONCAT option is set. The GRECS_OPTION_ADJUST_STRING_LOCATIONS option controls string locus adjustment. * src/parser.c (grecs_adjust_string_locations): Remove. (grecs_parser_options): New variable. * tests/Makefile.am: Add strcat.at, stradj.at * tests/testsuite.at: Likewise. * tests/gcffmt.c: New options -strcat and -stradj * tests/stradj.at: New test case. * tests/strcat.at: New test case.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9bf28da..65f590a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -121,6 +121,8 @@ TESTSUITE_AT = \
set.at\
sort00.at\
sort01.at\
+ stradj.at\
+ strcat.at\
testsuite.at\
vercmp.at\
wordsplit.at\

Return to:

Send suggestions and report system problems to the System administrator.