Module Name:    src
Committed By:   rillig
Date:           Sun Feb  7 12:56:53 UTC 2021

Modified Files:
        src/tests/lib/libcurses/director: testlang_parse.y

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libcurses/director/testlang_parse.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/director/testlang_parse.y
diff -u src/tests/lib/libcurses/director/testlang_parse.y:1.23 src/tests/lib/libcurses/director/testlang_parse.y:1.24
--- src/tests/lib/libcurses/director/testlang_parse.y:1.23	Sun Feb  7 12:48:34 2021
+++ src/tests/lib/libcurses/director/testlang_parse.y	Sun Feb  7 12:56:53 2021
@@ -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 <bl...@netbsd.org>
@@ -2092,5 +2092,5 @@ save_slave_output(bool discard)
 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);
 }

Reply via email to