summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2021-09-02 10:19:52 -0400
committerDan Davison <dandavison7@gmail.com>2021-09-02 18:35:15 -0400
commit7974d95501e8966436c0719239f2911a5cd16d3e (patch)
tree7b298d0d57cbbdfe64938a6bde590a3a4512425f /src
parent32138d031ec2bc42bc856f7a9b3367729256781c (diff)
Add failing test of navigate with (hunk-header-style without "line-number")
Ref #672
Diffstat (limited to 'src')
-rw-r--r--src/handlers/hunk_header.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/handlers/hunk_header.rs b/src/handlers/hunk_header.rs
index 3fae5e90..acf2dce7 100644
--- a/src/handlers/hunk_header.rs
+++ b/src/handlers/hunk_header.rs
@@ -354,4 +354,19 @@ pub mod tests {
assert_eq!(result, "");
}
+
+ #[test]
+ fn test_get_painted_file_with_line_number_empty_navigate() {
+ let cfg = integration_test_utils::make_config_from_args(&[
+ "--hunk-header-style",
+ "syntax bold",
+ "--hunk-header-decoration-style",
+ "omit",
+ "--navigate",
+ ]);
+
+ let result = get_painted_file_with_line_number(&vec![(3, 4)], "δ some-file", &cfg);
+
+ assert_eq!(result, "");
+ }
}