Skip to content

[ 2441975 ] Naming convention for Testsuites Management #427

@HolQue

Description

@HolQue

Hi Son,

derived from the regular expression and naming proposals in

#206 (comment)
#206 (comment)

and also based on

#366

I created this regular expression as naming convention for the Testsuites Management:

"^[\p{L}_][\p{L}0-9_\+\-\*/]*$"

It seems to work properly in pure Python:

search_pattern = "^[\p{L}_][\p{L}0-9_\+\-\*/]*$"
regex_pattern  = re.compile(search_pattern)

key_name = "123" # not allowed
key_name = "a123" # allowed
key_name = "_a123" # allowed
key_name = "𠼭_a123" # allowed
key_name = "𠼭_a€123" # not allowed
key_name = "𠼭_a#123" # not allowed
key_name = "𠼭_a-123" # allowed
key_name = "𠼭_a+123" # allowed
key_name = "𠼭_a*123" # allowed
key_name = "𠼭_a/123" # allowed
key_name = "$-𠼭_a/123" # not allowed
key_name = "[$-??_a/123]" # not allowed
key_name = "{$-??_a/123}" # not allowed

In CJasonPreprocessor.py

I exchanged

import re

by

import regex as re

But I get other (invalid) results than above in pure Python (names are accepted instead of being declined).

OK, maybe 'import regex as re' only is too simple and further adaptions in the JsonPreprocessor code are requiered.

But maybe you can check this and give "^[\p{L}_][\p{L}0-9_\+\-\*/]*$" a chance.

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions