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: actually compa...
details: https://anonhg.NetBSD.org/src/rev/c8af7e32d0d1
branches: trunk
changeset: 959310:c8af7e32d0d1
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Feb 07 17:50:16 2021 +0000
description:
tests/libcurses: actually compare the stream to an absolute path
Up to now, the test command "compare /dev/null" was a no-op since the
command was only parsed but not run at all. Now run it.
This makes the test mvwin fail. That test will have to be fixed.
Comparing to /dev/null is certainly possible and may make sense,
comparing to /dev/zero is nonsense since the actual stream can never be
endless. Some tests do that nevertheless, for whatever reason.
In order to have the expected test output closer to the curses commands
that cause it, it may be a good idea to add another command
'compare_str' that would work independently of an external file and at
the same time allow the expected output to be commented and explained.
This is not possible right now since the .chk files are read exactly
as-is.
diffstat:
tests/lib/libcurses/director/testlang_parse.y | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r d58c020d5842 -r c8af7e32d0d1 tests/lib/libcurses/director/testlang_parse.y
--- a/tests/lib/libcurses/director/testlang_parse.y Sun Feb 07 17:32:55 2021 +0000
+++ b/tests/lib/libcurses/director/testlang_parse.y Sun Feb 07 17:50:16 2021 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: testlang_parse.y,v 1.27 2021/02/07 17:32:55 rillig Exp $ */
+/* $NetBSD: testlang_parse.y,v 1.28 2021/02/07 17:50:16 rillig Exp $ */
/*-
* Copyright 2009 Brett Lymn <blymn%NetBSD.org@localhost>
@@ -431,15 +431,17 @@
no_input = true;
}
-compare : COMPARE PATH
- /* FIXME: missing action */
+compare : COMPARE PATH {
+ compare_streams($2, true);
+ }
| COMPARE FILENAME {
compare_streams($2, true);
}
;
-comparend : COMPAREND PATH
- /* FIXME: missing action */
+comparend : COMPAREND PATH {
+ compare_streams($2, false);
+ }
| COMPAREND FILENAME {
compare_streams($2, false);
}
@@ -544,7 +546,6 @@
}
;
- /* TODO: split into 'arg' */
args : /* empty */
| arg args
;
Home |
Main Index |
Thread Index |
Old Index