Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a sanity test to check if the language configuration is loaded
- Loading branch information
1 parent
aa18d08
commit 1bbc6c1
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
|
||
} |