## Changes
diff.py is like "diff -r -U2" but it applies replacements first to the
argument.
This allows comparing different output files and directories but ignore
differences that are going to be replaced by placeholders.
This is useful for tests that record large amount of files, specifically
"bundle init" with standard templates. In those tests, changing one
parameter results in a small diff so recording the full directory is not
helpful, because it's hard to see what changed there. I'm using it in
implementation of serverless mode for templates that need it: #2348 The
serverless templates are slightly different from classic, capturing the
diff helps to see exactly where.
Related small changes:
- Add [TESTROOT] replacement for absolute path to acceptance directory
in git repo.
- Add $TESTDIR env var for absolute path to a given test in git repo.
## Tests
- New test acceptance/selftest/diff to test the helper.
- Via #2348 which makes use of this feature.