Module Name: src Committed By: rillig Date: Thu Jul 6 07:33:36 UTC 2023
Modified Files: src/tests/usr.bin/xlint/lint1: check-expect.lua msg_247_lp64_ldbl128.c Log Message: tests/lint: ensure consistent preprocessor filenames in tests The deviations often happen when copying or renaming tests. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/check-expect.lua cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c 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/lint1/check-expect.lua diff -u src/tests/usr.bin/xlint/lint1/check-expect.lua:1.4 src/tests/usr.bin/xlint/lint1/check-expect.lua:1.5 --- src/tests/usr.bin/xlint/lint1/check-expect.lua:1.4 Sat Jul 1 09:21:31 2023 +++ src/tests/usr.bin/xlint/lint1/check-expect.lua Thu Jul 6 07:33:36 2023 @@ -1,5 +1,5 @@ #! /usr/bin/lua --- $NetBSD: check-expect.lua,v 1.4 2023/07/01 09:21:31 rillig Exp $ +-- $NetBSD: check-expect.lua,v 1.5 2023/07/06 07:33:36 rillig Exp $ --[[ @@ -91,6 +91,10 @@ local function load_c(fname) print_error("error: %s:%d: preprocessor line number must be %d", fname, phys_lineno, phys_lineno + 1) end + if ppl_fname:match("%.c$") and ppl_fname ~= basename then + print_error("error: %s:%d: preprocessor filename must be '%s'", + fname, phys_lineno, basename) + end pp_fname = ppl_fname pp_lineno = ppl_lineno end @@ -104,7 +108,7 @@ end -- -- example return value: { -- { --- exp_lineno = "18", +-- exp_lineno = 18, -- location = "file.c(18)", -- message = "not a constant expression [123]", -- } Index: src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c diff -u src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c:1.2 src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c:1.2 Wed Jul 5 11:42:14 2023 +++ src/tests/usr.bin/xlint/lint1/msg_247_lp64_ldbl128.c Thu Jul 6 07:33:36 2023 @@ -1,5 +1,5 @@ -/* $NetBSD: msg_247_lp64_ldbl128.c,v 1.2 2023/07/05 11:42:14 rillig Exp $ */ -# 3 "msg_247_lp64.c" +/* $NetBSD: msg_247_lp64_ldbl128.c,v 1.3 2023/07/06 07:33:36 rillig Exp $ */ +# 3 "msg_247_lp64_ldbl128.c" // Test for message: pointer cast from '%s' to '%s' may be troublesome [247]