1package soy.iko.opencode.ui.components
3import org.junit.Assert.assertEquals
4import org.junit.Assert.assertNull
7class ExtractFenceLanguageTest {
10 fun extractsLanguageTag() {
11 assertEquals("kotlin", extractFenceLanguage("```kotlin\nval x = 1\n```", isFenced = true))
15 fun takesFirstTokenOfInfoString() {
16 assertEquals("ts", extractFenceLanguage("```ts title=foo.ts\ncode\n```", isFenced = true))
20 fun nullForIndentedBlock() {
21 assertNull(extractFenceLanguage(" indented code", isFenced = false))
25 fun nullForBareFence() {
26 assertNull(extractFenceLanguage("```\nplain\n```", isFenced = true))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list