mariamjafri opened a new pull request, #11797: URL: https://github.com/apache/gravitino/pull/11797
### What changes were proposed in this pull request? Added a new unit-test file: `tests/unittests/test_gvfs_filename_encoding.py` which tests file-name encodings that contain special characters in the GVFS path-conversion layer. Particularly testing the following functions: `actual_path_to_gvfs_path`, `actual_info_to_gvfs_info`, and the round-trip through `extract_identifier` / `get_sub_path_from_virtual_path` / `to_gvfs_path_prefix`. Tests include spaces and URL-significant ASCII (`#`, `%`, `&`, `?`, `+`, `=`, `@`, `!`), multi-byte Unicode (CJK, accented Latin, Cyrillic, RTL), emoji, and path-structure characters (encoded slash `%2F`, leading/trailing dots, very long names) placed in filenames, nested directories, fileset-name segments, and sub-paths. The tests confirm all of these convert and round-trip correctly. One issue found is documented via `@unittest.expectedFailure`: the all-occurrences `str.replace` in `actual_path_to_gvfs_path` corrupts paths when the storage prefix recurs as a later directory segment. ### Why are the changes needed? Fix: #5869 Per the above issue, GVFS special-character / encoding behavior was untested and its correctness was uncertain. These tests verify and document it. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `pytest tests/unittests/test_gvfs_filename_encoding.py -v` → 5 passed, 1 xfailed 100 subtests passed. `ruff check` and `ruff format --check` pass clean. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
