Module Name: src
Committed By: rillig
Date: Sun Dec 10 18:04:55 UTC 2023
Modified Files:
src/tests/lib/libcurses/director: testlang_conf.l
Log Message:
tests/libcurses: require 3 digits in octal character escapes
Previously, the string literal "\0" had been interpreted as "0", which
would have made the backslash redundant. The tests don't use this form.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/lib/libcurses/director/testlang_conf.l
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libcurses/director/testlang_conf.l
diff -u src/tests/lib/libcurses/director/testlang_conf.l:1.26 src/tests/lib/libcurses/director/testlang_conf.l:1.27
--- src/tests/lib/libcurses/director/testlang_conf.l:1.26 Mon Nov 15 21:45:46 2021
+++ src/tests/lib/libcurses/director/testlang_conf.l Sun Dec 10 18:04:55 2023
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: testlang_conf.l,v 1.26 2021/11/15 21:45:46 blymn Exp $ */
+/* $NetBSD: testlang_conf.l,v 1.27 2023/12/10 18:04:55 rillig Exp $ */
/*-
* Copyright 2009 Brett Lymn <[email protected]>
@@ -86,7 +86,11 @@ dequote(const char *s, size_t *len)
(p[2] - '0');
p += 3;
} else {
- *q++ = *p++;
+ errx(2,
+ "%s:%zu: Invalid escape sequence "
+ "'\\%c' in string literal; octal "
+ "numbers must be 3 digits wide",
+ cur_file, line, *p);
}
continue;
}