test: add tests for files being created and modified with text editors#215
Open
test: add tests for files being created and modified with text editors#215
Conversation
We also add the ability to compare paths against a regex. This is useful for sed because in place modifications are actually made through a temporary file that uses a pattern that we have no control over.
After some manual testing, it seems nano does nothing special when saving files and it is quite challenging to script it, so I decided to remove it altogether.
25e26e2 to
b6587f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add tests that verify we get events when a file is created or modified via a text editor. Since we don't have rename events yet, we lose quite a bit of events, for instance sed modifies files via a temporary file and we don't see the final rename to the modified file, vi and its derivatives do a rename of the file to its name with
~as a suffix which we also don't catch.A new "strict" mode was added as an attempt to have tests fail when we implement new events in the future that we are missing now.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
The entire PR is tests.