summaryrefslogtreecommitdiff
path: root/tests/lib/libcurses/director
AgeCommit message (Collapse)Author
2021-11-15Add handling for backspace special character (\b)blymn
2021-06-13tests/libcurses: sprinkle 'const', normalize sizeofrillig
No functional change.
2021-06-10Unset ESCDELAY in libcurses test director to ensure consistent resultsmcf
Non-default values of ESCDELAY may result in unexpected test failures.
2021-04-06tests/libcurses: fix names of over-the-wire data typesrillig
The test 'mvscanw' reported that it would send '%s' as 'numeric', which was rather suspicious.
2021-04-06tests/libcurses: clean up table of input functionsrillig
The previous "table" was an insult to any reader. It was unsorted, listed the functions shuffled, and was not even formatted consistently. No functional change.
2021-04-06tests/libcurses: don't waste time calling strlen needlesslyrillig
2021-02-25tests/libcurses: use common style for parse error messagesrillig
2021-02-25tests/libcurses: use common syntax for accessing array elementsrillig
Writing *(p+1) is needlessly confusing, even though it adds a little symmetry between *p and *(p+1). Still, one of these expressions has parentheses, the other doesn't, which breaks the symmetry. Wrap overly long code line. It's confusing to refer to the digits after the backslash once with index 0 to 2, and the other time with index 1 to 3.
2021-02-25tests/libcurses: reduce indentationrillig
No functional change.
2021-02-25libcurses: prevent unknown escpae sequences in testsrillig
Before, '\b' was interpreted as a simple 'b', which is confusing for C programmers. Same for '\a'. There is absolutely no reason to escape letters, so fail early in these cases. The '\h' in the test addchstr was obviously a typo that was easy to detect, if only the compiler had been strict enough from the very beginning. The code is wider than 80 characters, same as the code that parses octal escape sequences a few lines above it. This code will be refactored to use less indentation in a follow-up commit.
2021-02-15Simplify to avoid copy based on the size of the source.joerg
2021-02-15tests/libcurses: fix error handling for non-system errorsrillig
These errors are unrelated to errno. The scanf family of functions also does not set errno.
2021-02-13tests/libcurses: fix child process handlingrillig
The child process needs to be properly controlled by the parent process. Otherwise it is not possible to get code coverage data from it using gcov since that requires the child process to exit normally. Previously the child process had been killed because its parent had exited.
2021-02-13tests/libcurses: fix error messagesrillig
2021-02-13tests/libcurses: remove undocumented, unused command line optionrillig
The option -T has the same effect as the removed option -p.
2021-02-13tests/libcurses: remove include path from usage messagerillig
The option has been removed a few minutes ago.
2021-02-13tests/libcurses: clean up inclusion guards, function declarationsrillig
No functional change.
2021-02-13tests/libcurses: remove include path handlingrillig
All include commands in the current test suite use relative paths. Instead of a fixed include path, interpret the included filename relative to the including file.
2021-02-13tests/libcurses: align commentsrillig
2021-02-13tests/libcurses: fix misleading usage documentationrillig
The check-files are not config files.
2021-02-13tests/libcurses: fix pipe handling in the parent processrillig
The parent process, like the child process, needs only 2 of the 4 pipe ends. In verbose mode (now at testlang_parse.y:1151 and :1154), both ends of the pipe_from_slave were examined. This looked like a typo and has been fixed to those pipe ends that are relevant to the parent process.
2021-02-13tests/libcurses: fix pipe handling in child processrillig
The child process only ever needs 2 ends of the pipes: one for reading the commands, one for writing back the results.
2021-02-13tests/libcurses: fix warnings for missing environment variablesrillig
2021-02-09tests/libcurses: add missing space after control flow keywordsrillig
2021-02-08tests/libcurses: fix off-by-one error in line numbers in diagnosticsrillig
I had broken this in testlang_parse.y 1.22 from 2021-02-07, when I extracted the common 'eol' from the statements. Extracting 'eol' had the effect that the action for the statement was run before the line number increased. Now the line numbers in the diagnostics are the same again as before. For lines that end with a backslash, the reported line number is the one from the last of these lines, not the first one, also as before. This feature is not used by any of the current tests though.
2021-02-08tests/libcurses: use consistent indentation for grammar rulesrillig
2021-02-08tests/libcurses: extract functions 'input' and 'noinput' from grammarrillig
2021-02-08tests/libcurses: indent grammar functions consistentlyrillig
2021-02-08tests/libcurses: declare %type in grammarrillig
It looks as if the original author just didn't know how to declare the type of non-terminals. The explicit types in the '$' expressions were all consistent. No functional change.
2021-02-08tests/libcurses: extract function 'delay_millis' from the grammarrillig
2021-02-08tests/libcurses: move function 'check' out of the grammar sectionrillig
This removes the inconsistent indentation.
2021-02-08tests/libcurses: fix typo in license textrillig
2021-02-08tests/libcurses: remove unused token DRAINrillig
There is a special function named 'DRAIN', but not a statement. The function name does not need its own token.
2021-02-08tests/libcurses: fix sentinel for execlrillig
For systems where NULL is defined as a simple 0 or 0L.
2021-02-08tests/libcurses: on errors, print nonprintable characters as wellrillig
2021-02-07tests/libcurses: use a single message style for diagnosticsrillig
Previously, there were several concurring styles: $msg in line %zu of file %s $msg line %zu of file %s %s, %zu: $msg All these are now replaced with "%s:%zu: $msg".
2021-02-07tests/libcurses: make grammar for test cases conflict-freerillig
No functional change.
2021-02-07tests/libcurses: fix grammar for arraysrillig
Previously, commas were completely ignored by the grammar. Erroring out on invalid characters made some of the tests fail since the comma was not recognized anymore. Add it back, but only for defining arrays. It would have been possible to leave out the commas or make them optional, but since the current tests do not make use of that, keep the grammar as strict as possible. Fix an unclosed string literal in a test. This had been wrongly accepted before by the grammar.
2021-02-07tests/libcurses: do not allow control characters in pathsrillig
2021-02-07tests/libcurses: error out on trying to parse /dev/zerorillig
Be strict when parsing the tests. Any unknown character is an error. This avoids an endless loop when running "./director /dev/zero". There is no point in silently ignoring other invalid characters as well, as this would only leave potential test writers in an unclear state, without any benefit.
2021-02-07tests/libcurses: require keywords to be lowercase, except for OK and ERRrillig
There is no need to write the keywords in upper case or mixed case. The only case where a keyword did not have the canonical form yet was a single lowercase 'ok' in the test case 'innstr'.
2021-02-07tests/libcurses: add missing semicolon in grammarrillig
2021-02-07tests/libcurses: fix typo in commentrillig
2021-02-07tests/libcurses: add const to some function parametersrillig
2021-02-07tests/libcurses: simplify code for writing to the .exp filerillig
If a write(2) returns less than 1, it must be an error.
2021-02-07tests/libcurses: actually compare the stream to an absolute pathrillig
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.
2021-02-07tests/libcurses: use more common abbreviations for tokensrillig
2021-02-07tests/libcurses: use standard indentation for grammar rule 'arg'rillig
2021-02-07tests/libcurses: extract grammar rule 'arg'rillig
2021-02-07tests/libcurses: error out if called with too many argumentsrillig
This helps against users who try to add more options after the first non-option argument and wonder why these options are silently ignored.