Skip to content

Commit 89d731d

Browse files
committed
tests/Hints: add test for recently added hint
Added in d703c55 .
1 parent 07aa04a commit 89d731d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/FSharpLint.Core.Tests/Rules/Hints/HintMatcher.fs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,4 +953,15 @@ let x y =
953953

954954
this.SetConfig(["List.map f (List.map g x) ===> List.map (g >> f) x"])
955955
this.Parse(source)
956-
Assert.AreEqual(expected, this.ApplyQuickFix source)
956+
Assert.AreEqual(expected, this.ApplyQuickFix source)
957+
958+
[<Test>]
959+
member this.``List append of singleton item can be replaced with :: operator``() =
960+
let source = """[head] @ tail"""
961+
962+
let expected = """head :: tail"""
963+
964+
this.SetConfig(["[x] @ y ===> x::y"])
965+
this.Parse(source)
966+
Assert.AreEqual(expected, this.ApplyQuickFix source)
967+

0 commit comments

Comments
 (0)