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

test: Add UNICODE_NAMES directive to files with utf-8 symbols #16136

Merged
merged 1 commit into from Feb 8, 2024

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Feb 2, 2024

Files containing symbols with unicode characters in their name might not be supported on some specific platforms. For example, the Solaris assembler lacks support for UTF-8 characters.

Assembler: mangle.d
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
        Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
Assembler: testmodule.d
        "/var/tmp//ccBtixAd.s", line 3 : Syntax error
        Near line: "    .globl  _D3run17unicode_06_哪里6哪里FiZi"
Assembler: ufcs.d
        "/var/tmp//ccodJ7Ib.s", line 6662 : Syntax error
        Near line: "    .globl  _D4ufcs6α8503FiZv"

Add a new directive which can be used by other testsuite runners as a hint to selectively disable the test if they know they can't compile this ahead of time.

Files containing symbols with unicode characters in their name might not
be supported on some specific platforms.  For example, the Solaris
assembler lacks support for UTF-8 characters.

```
Assembler: mangle.d
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
        Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
Assembler: testmodule.d
        "/var/tmp//ccBtixAd.s", line 3 : Syntax error
        Near line: "    .globl  _D3run17unicode_06_哪里6哪里FiZi"
Assembler: ufcs.d
        "/var/tmp//ccodJ7Ib.s", line 6662 : Syntax error
        Near line: "    .globl  _D4ufcs6α8503FiZv"
```

Add a new directive which can be used by other testsuite runners as a
hint to selectively disable the test if they know they can't compile
this ahead of time.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#16136"

@@ -1,6 +1,7 @@
// PERMUTE_ARGS:
// EXTRA_SOURCES: imports/mangle10077.d
// EXTRA_FILES: imports/testmangle.d
// UNICODE_NAMES:
Copy link
Member Author

Choose a reason for hiding this comment

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

@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 3, 2024

This is instead of encoding unicode characters in a special way in dmangle.d - similar to how floating point values are encoded.

https://issues.dlang.org/show_bug.cgi?id=19418

@RazvanN7 RazvanN7 merged commit 10d4332 into dlang:master Feb 8, 2024
48 checks passed
@ibuclaw ibuclaw deleted the unicode_directive branch February 9, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants