<NME> ElmOnBraceInsertHandlerTest.kt
<BEF> ADDFILE
<MSG> [feature] insert parentheses around selected expression (#736)

Co-authored-by: Ishmum Jawad Khan <05d4f44a24929518ef5411b7eef4fba8fb9caac9@gmail.com>
<DFF> @@ -0,0 +1,31 @@
+package org.elm.ide.typing
+
+import org.intellij.lang.annotations.Language
+
+
+class ElmOnBraceInsertHandlerTest : ElmTypingTestBase() {
+
+    fun `test add parentheses around selection`() = doTest("""
+f = <selection>4 + 3</selection>
+""", """
+f = (4 + 3)
+""")
+
+    fun `test add braces around selection`() = doTest("""
+f = <selection>name</selection>
+""", """
+f = {name}
+""", '{')
+
+    fun `test does not interfere with default brace behaviour`() = doTest("""
+f = {-caret-}
+""", """
+f = ()
+""")
+
+    fun doTest(@Language("Elm") before: String, @Language("Elm") after: String, c: Char = '(') {
+        checkByText(before, after) {
+            myFixture.type(c)
+        }
+    }
+}

[feature] insert parentheses around selected expression (#736)