Skip to content

Commit 14a146a

Browse files
committed
Core.Tests: add a failure test for fix suggestion
1 parent 12e13e2 commit 14a146a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/FSharpLint.Core.Tests/Rules/Typography/NoTabCharacters.fs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,16 @@ type TestTypographyTabCharacterInFile() =
2727

2828
Assert.IsFalse(this.ErrorExistsAt(2, 23))
2929
Assert.IsFalse(this.ErrorExistsAt(4, 13))
30+
31+
[<Test>]
32+
member this.TabCharacterInFileSuggestedFix() =
33+
let source = "\t"
34+
let expected = String.replicate 4 " "
35+
this.Parse source
36+
37+
Assert.IsTrue(this.ErrorExistsAt(1, 0))
38+
39+
let result = this.ApplyQuickFix source
40+
41+
Assert.AreEqual(expected, result)
42+

0 commit comments

Comments
 (0)