Skip to content

Commit

Permalink
[Diff] Test Git-diff swap
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelblyons committed Dec 17, 2024
1 parent 1f5f405 commit 53ae5aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Diff/Diff.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ contexts:
- match: ^(?={{git_first_line}})
embed: Packages/Git Formats/Git Diff.sublime-syntax#email-first-line
escape: (?!)
# Hack for unit tests
- include: incomplete-line
- match: ^
push: diffs

Expand Down
2 changes: 1 addition & 1 deletion Diff/tests/syntax_test_diff.diff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\ SYNTAX TEST "Packages/Diff/Diff.sublime-syntax"

--- Path to Original File
\^^^^^^^^^^^^^^^^^^^^^^^^ meta.diff.header.from-file meta.header.from-file.diff
\^^^^^^^^^^^^^^^^^^^^^^^^ meta.diff.header.from-file meta.header.from-file.diff - source.diff.git
\ <- punctuation.definition.from-file.diff
\^^ punctuation.definition.from-file.diff

Expand Down
15 changes: 15 additions & 0 deletions Diff/tests/syntax_test_switch_to_git.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
\ SYNTAX TEST "Packages/Git Formats/Git Diff.sublime-syntax"
From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001
\ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ comment.line.diff - source source
\ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constant.other.hash.git
From: Tony Luck <[email protected]>
\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.block.git-header.diff meta.mapping.diff - source source
\^^^ keyword.other.diff
\ ^ punctuation.separator.mapping.key-value.diff
\ ^^^^^^^^^ meta.reference.user.git
\ ^^^^^^^^^^^^^^^^^^^^^ meta.reference.email.git
\ ^ punctuation.definition.reference.email.begin.git
\ ^^^^^^^^^^^^^^^^^^^ entity.name.reference.email.git
\ ^ punctuation.separator.email.git
\ ^ punctuation.separator.domain.git
\ ^ punctuation.definition.reference.email.end.git

0 comments on commit 53ae5aa

Please sign in to comment.