One function
fg_validator in amoffat/sh
The author described this change as “fixes regression where `_fg` validator fails if `_fg=False`. closes #520”. It counts as a record because the check below fails on the code as it stood at c62b0335a and passes on e2cb0202e, with nothing else changed between the two runs.
Projectamoffat/sh
Fix saved2020-04-28
Sharing licenceMIT · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
fg is not valid with basically every other option
The change
| 9 | 9 | whitelist = set(("env", "fg", "cwd")) | |
| 10 | 10 | offending = set(passed_kwargs.keys()) - whitelist | |
| 11 | 11 | ||
| 12 | - | if "fg" in passed_kwargs and offending: | |
| 12 | + | if "fg" in passed_kwargs and passed_kwargs["fg"] and offending: | |
| 13 | 13 | invalid.append(("fg", msg)) | |
| 14 | 14 | return invalid |
The check that tells the two apart
fail→pass·test.py::FunctionalTests::test_fg_false
Check file test.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itc62b0335a66059fca9598019643f58a58e3c3e4d
Broken version dated2020-04-27
Modulesh
Units changedfg_validator
Fingerprint88b3552c36cd0b67
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in amoffat/sh
- 2020-10-21get_rc_exc
- 2016-10-10args