Skip to content

tests: ln: add test for non-UTF-8 source names in target-dir mode - #240

Closed
sylvestre wants to merge 1 commit into
coreutils:masterfrom
sylvestre:ln-utf
Closed

sylvestre wants to merge 1 commit into
coreutils:masterfrom
sylvestre:ln-utf

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

* tests/ln/non-utf8-src.sh: New test ensuring ln handles source
filenames containing non-UTF-8 bytes when linking into a target
directory, for both hard links and symbolic links with -t.
* tests/local.mk: Register the new test.
uutils/coreutils#11403
Comment thread tests/ln/non-utf8-src.sh
name=$(printf 'bad_\377')

# Create source file and target directory.
touch "$name" || framework_failure_

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bad unicode may not be supported by the file system.
We handle this in tests already like:

echo a > "$(bad_unicode)" \
  || skip_ 'bad unicode not supported in shell or file system'

@pixelb

pixelb commented Apr 6, 2026

Copy link
Copy Markdown
Member

Pushed in 262520980

@pixelb pixelb closed this Apr 6, 2026
gitmirroring-auto-sync-bot Bot pushed a commit to GitMirroring/coreutils that referenced this pull request Apr 6, 2026
* tests/ln/non-utf8-src.sh: New test ensuring ln handles source
filenames containing non-UTF-8 bytes when linking into a target
directory, for both hard links and symbolic links with -t.
* tests/local.mk: Register the new test.
uutils/coreutils#11403
coreutils/coreutils#240
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