Skip to content

Commit 242e312

Browse files
committed
Tests: add quickfix from camelCase to snake_case
1 parent f7ba50a commit 242e312

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/FSharpLint.Core.Tests/Rules/Conventions/Naming/LiteralNames.fs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,24 @@ let SuperCat = 5
124124

125125
Assert.IsTrue(this.ErrorExistsOnLine 5)
126126

127+
[<Test>]
128+
member this.SuggestedFix() =
129+
let source = """
130+
module Program
131+
132+
[<Literal>]
133+
let superCat = 5
134+
"""
135+
let expected = """
136+
module Program
137+
138+
[<Literal>]
139+
let super_cat = 5
140+
"""
141+
this.Parse source
142+
143+
Assert.IsTrue(this.ErrorExistsOnLine 5)
144+
145+
let result = this.ApplyQuickFix source
146+
147+
Assert.AreEqual(expected, result)

0 commit comments

Comments
 (0)