Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support three-character file extension as search pattern in .NET Framework #530

Merged

Conversation

vbreuss
Copy link
Member

@vbreuss vbreuss commented Mar 28, 2024

This fixes the edge case in .NET Framework described in TestableIO/System.IO.Abstractions#895

See EnumerateFiles:

.NET Framework only: When you use the asterisk wildcard character in searchPattern and you specify a three-character file extension, for example, "*.txt", this method also returns files with extensions that begin with the specified extension. For example, the search pattern "*.xls" returns both "book.xls" and "book.xlsx". This behavior only occurs if an asterisk is used in the search pattern and the file extension provided is exactly three characters. If you use the question mark wildcard character somewhere in the search pattern, this method returns only files that match the specified file extension exactly

> NET Framework only: When you use the asterisk wildcard character in searchPattern and you specify a three-character file extension, for example, "*.txt", this method also returns files with extensions that begin with the specified extension.
@vbreuss vbreuss added the bug Something isn't working label Mar 28, 2024
@vbreuss vbreuss self-assigned this Mar 28, 2024
@vbreuss vbreuss enabled auto-merge (squash) March 28, 2024 13:40
Copy link

Stryker.NET was executed on the changes in the pull request:
Mutation testing badge

Copy link

sonarcloud bot commented Mar 28, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vbreuss vbreuss merged commit 73eeb9d into main Mar 28, 2024
14 checks passed
@vbreuss vbreuss deleted the topic/support-3-character-extension-edge-case-in-net-framework branch March 28, 2024 14:55
Copy link

This is addressed in release v3.0.0.

vbreuss added a commit to Testably/Testably.Abstractions.FluentAssertions that referenced this pull request Mar 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[Testably.Abstractions.Interface](https://togithub.com/Testably/Testably.Abstractions)
| `2.6.1` -> `3.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testably.Abstractions.Interface/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testably.Abstractions.Interface/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testably.Abstractions.Interface/2.6.1/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testably.Abstractions.Interface/2.6.1/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Testably/Testably.Abstractions
(Testably.Abstractions.Interface)</summary>

###
[`v3.0.0`](https://togithub.com/Testably/Testably.Abstractions/releases/tag/v3.0.0)

#### Breaking Changes

- Rename namespace from
`Testably.Abstractions.Testing.FileSystemInitializer` to
`Testably.Abstractions.Testing.Initializer`
- Move static methods from `RandomProvider.Generator<T>` to
`RandomProvider.Generator`
-   Remove `PathSystemBase` from `Testably.Abstractions.Interface`
- Update `TestableIO.System.IO.Abstractions` to v21.0.2 and adapt
interface according to the breaking change in
[TestableIO/System.IO.Abstractions#1104
-   Make class `FileSystemWatcherMock` internal

#### What's Changed

- chore(deps): update testably.abstractions packages to v2.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#447
- chore(deps): update dependency xunit to v2.6.6 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#449
- chore(deps): update actions/cache action to v4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#450
- chore(deps): update dependency testableio.system.io.abstractions to
v20.0.15 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#451
- chore(deps): update nuget/setup-nuget action to v1.3.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#452
- chore(deps): update microsoft/setup-msbuild action to v2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#453
- chore(deps): update nuget/setup-nuget action to v2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#454
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.1 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#455
- chore(deps): update dependency microsoft.net.test.sdk to v17.9.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#456
- chore(deps): update wandalen/wretry.action action to v1.4.4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#457
- chore(deps): update dependency coverlet.collector to v6.0.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#459
- chore(deps): update xunit-dotnet monorepo by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#458
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.2 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#461
- refactor: make `Execute` non-static by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#462
- refactor: fix sonar issues by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#463
- refactor: use non-static OS selector in tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#464
- chore(deps): update wandalen/wretry.action action to v1.4.5 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#465
- chore(deps): update dependency microsoft.codeanalysis.csharp to v4.9.2
by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#466
- refactor: cleanup inconsistent line endings by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#467
- chore(deps): update dependency minver to v5 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#469
- chore(deps): update wandalen/wretry.action action to v1.4.7 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#470
- chore(deps): update wandalen/wretry.action action to v1.4.8 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#472
- chore(deps): update dependency testableio.system.io.abstractions to
v20.0.28 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#475
- chore(deps): update softprops/action-gh-release action to v2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#473
- feat: add statistics by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#474
- fix: errors from static code analysis by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#477
- refactor: replace the dictionary in the statistics with an array by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#478
- docs: improve readme examples by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#480
- chore(deps): update wandalen/wretry.action action to v1.4.9 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#481
- chore(deps): update actions/checkout digest to
[`9bb5618`](https://togithub.com/Testably/Testably.Abstractions/commit/9bb5618)
by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#483
- chore(deps): update actions/checkout digest to
[`b4ffde6`](https://togithub.com/Testably/Testably.Abstractions/commit/b4ffde6)
by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#484
- chore(deps): update dependency coverlet.collector to v6.0.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#485
- chore(deps): update wandalen/wretry.action action to v1.4.10 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#486
- feat: add Api approval tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#482
- refactor: normalize line endings using `.gitattributes` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#487
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.3 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#488
- feat: add global.json to use latest SDK by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#479
- chore(deps): update dependency dotnet-sdk to v8.0.202 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#489
- chore(deps): update dependency dotnet-sdk to v8.0.203 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#490
- chore: Limit "renovate" to run only weekly by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#491
- feat: add statistics for property access by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#493
- fix: Install .NET on code upload step by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#494
- refactor: switch to sonar automatic analysis by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#496
- fix: sonar issues after activating automatic analysis by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#495
- refactor: adapt and execute cleanup by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#498
- fix: use latest stryker.net version by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#497
- refactor: adapt ReSharper File Layout to avoid Sonar issues during
cleanup by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#499
- fix: correctly match statistic paths by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#500
- refactor: extract extension methods from `Execute` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#501
- feat: avoid arbitrary statistic calls by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#502
- coverage: add tests for `FileSystemWatcher` events by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#503
- fix: avoid statistic registrations on complex initializations by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#505
- refactor: exclude obsolete methods from code coverage by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#504
- chore!: update `TestableIO.System.IO.Abstractions` to v21.0.2 by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#506
- feat: remove obsolete class `PathSystemBase` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#507
- refactor: simplify changing the test settings by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#508
- chore(deps): update dependency nunit.analyzers to v4.1.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#510
- chore(deps): update dependency newtonsoft.json to v13.0.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#509
- feat: include skip message for long running tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#511
- docs: add license scan report and status by
[@&#8203;fossabot](https://togithub.com/fossabot) in
[Testably/Testably.Abstractions#512
- feat: enable/disable brittle tests via test settings by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#514
- fix: add lock file to directory cleaner by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#515
- feat: add retry also to .NET Framework tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#517
- feat: add `Meziantou.Analyzer` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#519
- fix: disable build warning CS0436 in
`Testably.Abstractions.Testing.Tests` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#516
- refactor: remove `.ConfigureAwait` in tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#520
- refactor: dispose of `ManualResetEventSlim` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#518
- coverage: avoid skipping brittle tests in `FileSystemWatcher` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#521
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.4 by [@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#523
- chore(deps): update dependency meziantou.analyzer to v1.0.758 by
[@&#8203;renovate](https://togithub.com/renovate) in
[Testably/Testably.Abstractions#524
- fix: do not adjust LastAccessTime in `FileStream.EndRead` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#522
- coverage: add missing tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#525
- feat: collect coverage information for .NET Framework by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#526
- fix: Report Generator does not support mixing .NET Framework and .NET
Core by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#527
- feat: Enable Stryker CI-Build by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#528
- fix: support search pattern with subdirectories when enumerating a
directory by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#529
- fix: support three-character file extension as search pattern in .NET
Framework by [@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#530
- fix: dependency error in release.yml by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#531
- fix: catch `ObjectDisposedException` in tests by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#532
- refactor: catch `ObjectDisposedException` in `TimerMockTests` by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#533
- fix: use latest Stryker version in release pipeline by
[@&#8203;vbreuss](https://togithub.com/vbreuss) in
[Testably/Testably.Abstractions#534

#### New Contributors

- [@&#8203;fossabot](https://togithub.com/fossabot) made their first
contribution in
[Testably/Testably.Abstractions#512

**Full Changelog**:
Testably/Testably.Abstractions@v2.6.1...v3.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Testably/Testably.Abstractions.FluentAssertions).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valentin Breuß <vbreuss@gmail.com>
Copy link

This is addressed in release v3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working state: released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant