Add tests for singlefile bundles with non-ascii characters#118281
Merged
jtschuster merged 6 commits intodotnet:mainfrom Aug 5, 2025
Merged
Add tests for singlefile bundles with non-ascii characters#118281jtschuster merged 6 commits intodotnet:mainfrom
jtschuster merged 6 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive test coverage for singlefile bundles containing non-ASCII characters to ensure proper UTF-8 encoding throughout the bundling process. The change addresses issue #118098 by validating that the bundler correctly handles Unicode strings in file paths and bundle metadata.
- Creates a new test project
HelloWorld_中文with Chinese characters to verify Unicode support - Adds unit tests to validate bundling operations with non-ASCII file paths and names
- Extends integration tests to verify end-to-end functionality of bundles with special characters
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| BundlerConsistencyTests.cs | Adds unit test for bundling files with non-ASCII characters in relative paths |
| AppLaunch.cs | Adds integration test for launching self-contained apps with non-ASCII names |
| HelloWorld_中文/*.cs | New test project files with Unicode characters in project name |
| HelloWorld_中文/*.csproj | Project configuration files for the Unicode test project |
Comments suppressed due to low confidence (1)
src/installer/tests/Microsoft.NET.HostModel.Tests/Bundle/BundlerConsistencyTests.cs:135
- The test creates a bundle but doesn't verify that the bundle was created successfully or validate any properties of the generated bundle. Consider adding assertions to verify the bundle generation succeeded and that the non-ASCII characters are preserved correctly.
var bundlePath = bundler.GenerateBundle(fileSpecs);
Contributor
|
Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov |
elinor-fung
reviewed
Aug 4, 2025
…/runtime into HostWriterChineseChar
elinor-fung
approved these changes
Aug 5, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds tests for bundles that contain non-ascii characters to validate all strings in a singlefile bundle are written as UTF-8.
Fixes #118098