Skip to content

Commit

Permalink
Added a sanity test to check if the language configuration is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthkuruvila committed May 28, 2018
1 parent aa18d08 commit 1bbc6c1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/kotlin/org/ocaml/IdeSanityTest.kt
@@ -0,0 +1,26 @@
package org.ocaml

import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import junit.framework.Assert

class IdeSanityTest : LightPlatformCodeInsightFixtureTestCase() {
fun testOcaml(){
val script = """
module TestModule = struct
let some_val = 1
let some_other_val = 2
end"""
myFixture.configureByText("test.ml", script)

val lang = myFixture.file.language.id
Assert.assertEquals("Ocaml", lang)
}

fun testJBuild(){
val script = "((jbuild_version 1))"
myFixture.configureByText("jbuild", script)
val lang = myFixture.file.language.id
Assert.assertEquals("OcamlJbuilder", lang)
}

}

0 comments on commit 1bbc6c1

Please sign in to comment.