Legal: Add copyright, licence and warranty notice to many files The .sd.mk and .expected files in tests/filter/ are more complicated. We'll do those in a moment. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter: Print all the diffs, not just the first Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter/check: Capture generate's stderr We are going to cause `generate' to emit warnings, which we want to check are working. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter: Rename `doctest' -> `doctests' everywhere This is more uniform. A lot of churn, though. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
doctests: check: Define i and o vars This makes bash -x debugging easier. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter/check: Enable pipefail So we must use bash. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
doctests: Extract and use Include the doctests from the toplevel Subdir.sd.mk. In check, extract the doctests, and seddery the expected output into the combined expected output file. This involves adding a comment in Subdir.mk.expected to indicate where the doctests will appear. In update-expected, contrive to strip the doctest output back out of the actual output so we can update only the manually-edited part. Consequential changes to MAKEFILE_TEMPLATES in main.mk.expected and .gitignore. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter: Add .../sub/dir This will let us test output which depends on the subdirectory, which is kind of the whole point... Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter: New test framework for generate This test case bypasses autoconf and runs generate directly. It also gives us somewhere to write examples of each of the &-expansions without further cluttering test-example. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>