aboutsummaryrefslogtreecommitdiff
path: root/testdir
AgeCommit message (Collapse)Author
2021-01-10Change T.errmsg print to file fail test.ozan s. yigit
We cannot have a test that destroys eg. /etc/passwd if someone runs it as root.
2020-07-29Fix the T.errmsg test (#91)Tim van der Molen
Co-authored-by: Tim van der Molen <tim@kariliq.nl>
2020-02-283 more fixes (#75)zoulasc
* LC_NUMERIC radix issue. According to https://pubs.opengroup.org/onlinepubs/7990989775/xcu/awk.html The period character is the character recognized in processing awk programs. Make it so that during output we also print the period character, since this is what other awk implementations do, and it makes sense from an interoperability point of view. * print "T.builtin" in the error message * Fix backslash continuation line handling. * Keep track of RS processing so we apply the regex properly only once per record.
2020-02-18argument parsing cleanups, dynamic program file allocation, fpe error ↵zoulasc
enhancement. (#72) * - enhance fpe handler to print the error type - cleanup argument parsing - dynamically allocate program filename array * bison uses enums now, not #define's, make it work with that. * We need to use either the enums or the defines but not both. This is because bison -y will create both enums and #defines, while bison without -y produces only the enums, and byacc produces just #defines. * fix indentation * Set the tokentype when we have a match in the scan, and reset it later when we decide that the match was bad. Fixes nbyacc. * - don't use pattern rules for portability - try to move both flavors of generated names for portability * Amend tests for the new error messages
2020-02-06Restore zoulas fixes, step 1.Arnold D. Robbins
2020-02-06Revert zoulas changes until we can keep tests passing.Arnold D. Robbins
2020-02-06misc fixes (#69)zoulasc
* Add a test for german case folding. * Add a function to copy a string with a string with a larger allocation (to be used by the case folding routines) * Add printf attributes to the printf-like functions and fix one format warning * Cleanup the tempfree macro * make more functions static * rename fp to frp (FRame Pointer) to avoid shadowing with fp (File Pointer). * add more const * fix indent in UPLUS case * add locale-aware case folding * make nfiles size_t * fix bugs in file closing: - compare fclose to EOF and pclose to -1 - use nfiles instead of FOPEN_MAX in closeall - don't close files we did not open (0,1,2) fpurge/fflush instead * - use NUL instead of 0 for char comparisons - add ISWS() macro - use continue; instead of ; * Check for existance of the german locale before using it. * Add missing parentheses, thanks Arnold.
2020-01-31Fix a{0}, update tests.Arnold D. Robbins
2020-01-17Make I/O errors fatal instead of mere warnings (#63)Martijn Dekker
An input/output error indicates a fatal condition, even if it occurs when closing a file. Awk should not return success on I/O error, but treat I/O errors as it already treats write errors. Test case: $ (trap '' PIPE; awk 'BEGIN { print "hi"; }'; echo "E $?" >&2) | : awk: i/o error occurred while closing /dev/stdout source line number 1 E 2 The test case pipes a line into a dummy command that reads no input, with SIGPIPE ignored so we rely on awk's own I/O checking. No write error is detected, because the pipe is buffered; the broken pipe is only detected as an I/O error on closing stdout. Before this commit, "E 0" was printed (indicating status 0/success) because an I/O error merely produced a warning. A shell script was unable to detect the I/O error using the exit status.
2020-01-10rename T.concat to T.csconcat to avoid case-insensitive conflict (#64)Martijn Dekker
On case-insensitive file systems (i.e.: macOS), T.concat and t.concat are the same file, so these conflicted. This commit renames T.concat to avoid the conflict.
2020-01-05Fix merging of concatenated string constants.Arnold D. Robbins
2019-12-27Bug fix in interval expressions.Arnold D. Robbins
2019-12-11Fix printf format conversions. (#59)zoulasc
Further simplify printf % parsing by eating the length specifiers during the copy phase, and substitute 'j' when finalizing the format. Add some more tests for this.
2019-11-08Small fixes in the test suite.Arnold D. Robbins
2019-07-16Revise testdir/T.split per PR #42.Arnold D. Robbins
2019-07-16Update T.split to match code changes.Arnold D. Robbins
2019-06-23Extract testdir.Arnold D. Robbins