Skip to content

Commit 5dec281

Browse files
committed
test(gen): Cover more cases for enum value generation
Relates-to: #502
1 parent 2f1f83b commit 5dec281

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4545
- Check for nullability when loading relationships.
4646
- Handle table names quoted with backticks in mysql query parser. (thanks @luiscleto)
4747
- Allow matching columns in type replacements by the `autoincr` property as stated in the docs. (thanks @abdusco)
48+
- Handle dashes and spaces in generated enum values properly (thanks @abdusco)
4849

4950
## [v0.38.0] - 2025-06-04
5051

gen/templates_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ func Test_enumValToIdentifier(t *testing.T) {
1515
{" in progress ", "InProgress"},
1616
// This is OK, because enum values are prefixed with the type name, e.g. TaskStatus1InProgress
1717
{"1-in-progress", "1InProgress"},
18+
{"start < end", "StartU3CEnd"},
1819
}
1920
for _, tt := range tests {
2021
t.Run(tt.val, func(t *testing.T) {

0 commit comments

Comments
 (0)