Allow dashes in experimental option identifiers (#16093)

# Description

In #16028 I also added a test to check that identifiers are valid to
ensure that we have consistency there. But I only checked for
alphanumeric strings as identifiers. It doesn't allow underscores or
dashes. @Bahex used in his PR about #15682 a dash to separate words. So
expanded the test to allow that.

# User-Facing Changes

None.

# Tests + Formatting

The `assert_identifiers_are_valid` now allows dashes.

# After Submitting

The tests in #15682 should work then.
This commit is contained in:
Piepmatz
2025-07-02 12:31:01 +02:00
committed by GitHub
parent 2c1b787db5
commit 105ec0c89f

View File

@ -75,7 +75,7 @@ mod tests {
assert!(first.is_lowercase()); assert!(first.is_lowercase());
for char in chars { for char in chars {
assert!(char.is_alphanumeric()); assert!(char.is_alphanumeric() || char == '-');
if char.is_alphabetic() { if char.is_alphabetic() {
assert!(char.is_lowercase()); assert!(char.is_lowercase());
} }