Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: allow end-of-l...
details: https://anonhg.NetBSD.org/src/rev/1862423d2beb
branches: trunk
changeset: 959290:1862423d2beb
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Feb 07 12:05:36 2021 +0000
description:
tests/libcurses: allow end-of-line comments in data lines as well
This makes it possible to write small remarks directly in the affected
line, which not only makes for a clean visual appearance but also shows
up prominently in "cvs annotate" or "git blame", showing when such a
remark has been modified.
diffstat:
tests/lib/libcurses/director/testlang_conf.l | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r f4f3dfa29337 -r 1862423d2beb tests/lib/libcurses/director/testlang_conf.l
--- a/tests/lib/libcurses/director/testlang_conf.l Sun Feb 07 11:52:43 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_conf.l Sun Feb 07 12:05:36 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: testlang_conf.l,v 1.10 2021/02/07 11:52:43 rillig Exp $ */
+/* $NetBSD: testlang_conf.l,v 1.11 2021/02/07 12:05:36 rillig Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -364,15 +364,16 @@
return VARIABLE;
}
- /* comments, white-outs */
+ /* whitespace, comments */
[ \t\r] |
#.* ;
-^#.*\n |
-#.*\n |
+
+^[ \t\r]*#.*\n |
\\\n |
^\n line++;
/* eol on a line with data. need to process, return eol */
+#.*\n |
\n {
line++;
return EOL;
Home |
Main Index |
Thread Index |
Old Index