Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libcurses/director tests/libcurses: fail on syntax...



details:   https://anonhg.NetBSD.org/src/rev/2f79433c29b9
branches:  trunk
changeset: 951899:2f79433c29b9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Feb 07 12:56:53 2021 +0000

description:
tests/libcurses: fail on syntax errors in test files

Previously, a syntax error in a test file made the test pass, which was
outright dangerous.

diffstat:

 tests/lib/libcurses/director/testlang_parse.y |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 012ea0b62e6f -r 2f79433c29b9 tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 12:48:34 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y     Sun Feb 07 12:56:53 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: testlang_parse.y,v 1.23 2021/02/07 12:48:34 rillig Exp $       */
+/*     $NetBSD: testlang_parse.y,v 1.24 2021/02/07 12:56:53 rillig Exp $       */
 
 /*-
  * Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -2092,5 +2092,5 @@
 static void
 yyerror(const char *msg)
 {
-       warnx("%s in line %zu of file %s", msg, line, cur_file);
+       errx(1, "%s in line %zu of file %s", msg, line, cur_file);
 }



Home | Main Index | Thread Index | Old Index