Module Name: src Committed By: rillig Date: Fri Jun 17 07:06:50 UTC 2022
Modified Files: src/tests/usr.bin/xlint: check-expect.lua Log Message: tests/lint: do not interpret 'expect:' comments, only 'expect+-n:' Only the tests in msg_*.c had used the short form of the 'expect:' comments. The other tests used the more detailed variant 'expect+n:' or 'expect-n:'. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tests/usr.bin/xlint/check-expect.lua Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/check-expect.lua diff -u src/tests/usr.bin/xlint/check-expect.lua:1.18 src/tests/usr.bin/xlint/check-expect.lua:1.19 --- src/tests/usr.bin/xlint/check-expect.lua:1.18 Fri Jun 17 06:59:16 2022 +++ src/tests/usr.bin/xlint/check-expect.lua Fri Jun 17 07:06:50 2022 @@ -1,11 +1,11 @@ #! /usr/bin/lua --- $NetBSD: check-expect.lua,v 1.18 2022/06/17 06:59:16 rillig Exp $ +-- $NetBSD: check-expect.lua,v 1.19 2022/06/17 07:06:50 rillig Exp $ --[[ usage: lua ./check-expect.lua *.c -Check that the /* expect: ... */ comments in the .c source files match the +Check that the /* expect+-n: ... */ comments in the .c source files match the actual messages found in the corresponding .exp files. ]] @@ -60,15 +60,6 @@ local function load_expect_comments_from add_expectation(tonumber(offset), comment) end - -- TODO: Remove these comments for all tests, as they often contain - -- only the raw message ID, without the actual message text, - -- which makes them harder to understand without looking up more context. - for comment in line:gmatch("/%* expect: (.-) %*/") do - if not fname:match("^msg_") then - add_expectation(0, comment) - end - end - pp_lineno = pp_lineno + 1 local ppl_lineno, ppl_fname = line:match("^#%s*(%d+)%s+\"([^\"]+)\"")