Module Name: src Committed By: rillig Date: Sun Nov 28 09:10:36 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint2: t_lint2.sh Log Message: tests/lint2: fix regular expressions containing backslash In regular expressions, a backslash must be doubled. In this case, ATF didn't complain because the single backslashes were used in the pattern '\($2\)', where they produced '\(...\\)'. Omitting the backslash for the closing parenthesis was apparently OK; other regex implementations complain about this. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint2/t_lint2.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/lint2/t_lint2.sh diff -u src/tests/usr.bin/xlint/lint2/t_lint2.sh:1.8 src/tests/usr.bin/xlint/lint2/t_lint2.sh:1.9 --- src/tests/usr.bin/xlint/lint2/t_lint2.sh:1.8 Sun Sep 5 18:17:15 2021 +++ src/tests/usr.bin/xlint/lint2/t_lint2.sh Sun Nov 28 09:10:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_lint2.sh,v 1.8 2021/09/05 18:17:15 rillig Exp $ +# $NetBSD: t_lint2.sh,v 1.9 2021/11/28 09:10:36 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -141,9 +141,9 @@ error_cases_body() test_error '0c0.0s2"' 'trailing data: ' test_error '0c0.0s2"%' 'missing closing quote' # shellcheck disable=SC1003 - test_error '0c0.0s2"\' 'missing after \' + test_error '0c0.0s2"\' 'missing after \\' # shellcheck disable=SC1003 - test_error '0c0.0s2"%\' 'missing after \' + test_error '0c0.0s2"%\' 'missing after \\' # declarations and definitions test_error '0d0' 'bad line number'