-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88e967c
commit c29dcf2
Showing
1 changed file
with
46 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 |
---|---|---|
|
@@ -688,6 +688,19 @@ mod tests { | |
assert!(output.contains("\nSubmodule x/y/z contains untracked content\n")); | ||
} | ||
|
||
#[test] | ||
fn test_triple_dash_at_beginning_of_line_in_code() { | ||
let options = get_command_line_options(); | ||
let output = strip_ansi_codes(&run_delta( | ||
TRIPLE_DASH_AT_BEGINNING_OF_LINE_IN_CODE, | ||
&options, | ||
)) | ||
.to_string(); | ||
assert!( | ||
output.contains(" -- instance (Category p, Category q) => Category (p ∧ q) where\n") | ||
); | ||
} | ||
|
||
const ADDED_FILE_INPUT: &str = "\ | ||
commit d28dc1ac57e53432567ec5bf19ad49ff90f0f7a5 | ||
Author: Dan Davison <[email protected]> | ||
|
@@ -798,5 +811,38 @@ This is a regular file that contains: | |
y | ||
x | ||
Submodule x/y/z contains untracked content | ||
"; | ||
|
||
const TRIPLE_DASH_AT_BEGINNING_OF_LINE_IN_CODE: &str = "\ | ||
commit d481eaa8a249c6daecb05a97e8af1b926b0c02be | ||
Author: FirstName LastName <[email protected]> | ||
Date: Thu Feb 6 14:02:49 2020 -0500 | ||
Reorganize | ||
diff --git a/src/Category/Coproduct.hs b/src/Category/Coproduct.hs | ||
deleted file mode 100644 | ||
index ba28bfd..0000000 | ||
--- a/src/Category/Coproduct.hs | ||
+++ /dev/null | ||
@@ -1,18 +0,0 @@ | ||
-{-# LANGUAGE InstanceSigs #-} | ||
-module Category.Coproduct where | ||
- | ||
-import Prelude hiding ((.), id) | ||
- | ||
-import Control.Category | ||
- | ||
-import Category.Hacks | ||
- | ||
--- data (p ∨ q) (a :: (k, k)) (b :: (k, k)) where | ||
--- (:<:) :: p a b -> (∨) p q '(a, c) '(b, d) | ||
--- (:>:) :: q c d -> (∨) p q '(a, c) '(b, d) | ||
--- | ||
--- instance (Category p, Category q) => Category (p ∧ q) where | ||
--- (p1 :×: q1) . (p2 :×: q2) = (p1 . p2) :×: (q1 . q2) | ||
--- | ||
--- id :: forall a. (p ∧ q) a a | ||
--- id | IsTup <- isTup @a = id :×: id | ||
"; | ||
} |