Skip to content

Conversation

@stogle
Copy link
Contributor

@stogle stogle commented Jan 6, 2026

This PR provides some additional test cases as requested. It is not intended to be merged in its current state.

Four new tests are added to Testably.Abstractions.Tests.FileSystem.FileSystemWatcher.NotifyFiltersTests:

  • NotifyFilter_MoveFileOutOfTheWatchedDirectory_ShouldTriggerRenamed_OnLinuxOrMac
  • NotifyFilter_MoveFileInToTheWatchedDirectory_ShouldTriggerRenamed_OnLinuxOrMac
  • NotifyFilter_MoveDirectoryOutOfTheWatchedDirectory_ShouldTriggerRenamedEventOnNotifyFilters_OnLinuxOrMac
  • NotifyFilter_MoveDirectoryInToTheWatchedDirectory_ShouldTriggerRenamedEventOnNotifyFilters_OnLinuxOrMac

These are parallels to the existing Windows-only tests that test the expected behaviour of the same scenarios on Linux and Mac. On Windows, these move operations trigger Created or Deleted events, whilst on Linux or Mac they trigger Renamed events.

These tests all pass with Testably.Abstractions.Testing 5.0.0 but all fail with 5.0.1, following the fix #900 for issue #899. I believe that these tests are valid and that this is a regression. The problem seems to be in TransformPathAndName, which expects its argument to start with FullPath, but in these tests the argument does not start with FullPath, so it chops part of the actual path off. I guess some logic that was removed in #900 needs to be restored but I'm not sure what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants