Module Name: src Committed By: rillig Date: Wed Jul 10 05:43:58 UTC 2024
Modified Files: src/tests/usr.bin/xlint/lint1: accept.sh Log Message: tests/lint: allow empty lines in .exp-ln files The generated .ln files neither contain spaces nor empty lines. To make the input more human-readable, allow empty lines in the expected .ln files. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/xlint/lint1/accept.sh 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/accept.sh diff -u src/tests/usr.bin/xlint/lint1/accept.sh:1.15 src/tests/usr.bin/xlint/lint1/accept.sh:1.16 --- src/tests/usr.bin/xlint/lint1/accept.sh:1.15 Sun Jan 28 08:17:27 2024 +++ src/tests/usr.bin/xlint/lint1/accept.sh Wed Jul 10 05:43:58 2024 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: accept.sh,v 1.15 2024/01/28 08:17:27 rillig Exp $ +# $NetBSD: accept.sh,v 1.16 2024/07/10 05:43:58 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -90,7 +90,7 @@ for pattern in "$@"; do elif [ "$ln_file" = '/dev/null' ]; then rm "$ln_tmp_file" else - if tr -d ' \t' < "$ln_file" > "$ln_file.trimmed.tmp" && + if tr -d ' \t' < "$ln_file" | sed '/^$/d' > "$ln_file.trimmed.tmp" && tr -d ' \t' < "$ln_tmp_file" > "$ln_tmp_file.trimmed.tmp" && cmp -s "$ln_file.trimmed.tmp" "$ln_tmp_file.trimmed.tmp"; then rm "$ln_tmp_file"