Normalize shell and patch tool cards
This commit is contained in:
1 parent
4dc3e3d784
commit
b507656abd
11 files changed
+327
-16
No files matched your search
@@ -338,6 +338,21 @@ class HighlighterTest {
|
||||
assertEquals("+[-]", highlight("+[-]", fenceLanguage("brainfuck")).text)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `a diff colours changes and identifies its framing separately`() {
|
||||
val code = "--- a/file\n+++ b/file\n@@ -1 +1 @@\n-old\n context\n+new"
|
||||
assertSpans(code, Language.DIFF, Kind.DELETION, "-old")
|
||||
assertSpans(code, Language.DIFF, Kind.ADDITION, "+new")
|
||||
assertSpans(
|
||||
code,
|
||||
Language.DIFF,
|
||||
Kind.METADATA,
|
||||
"--- a/file",
|
||||
"+++ b/file",
|
||||
"@@ -1 +1 @@",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `every language the fence table knows has a scanner`() {
|
||||
Language.entries.forEach { spansOf("x", it) }
|
||||
|
||||
Reference in new issue
Block a user