-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid negative repeat_count fixes #1760
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
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
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 |
---|---|---|
|
@@ -2137,6 +2137,30 @@ src/align.rs:71: impl<'a> Alignment<'a> { │ | |
"###); | ||
} | ||
|
||
#[test] | ||
fn test_long_line_underflow() { | ||
let output = DeltaTest::with_args(&["--raw", "--width" , "111", "--zero-style", "syntax #FFFFFF"]).with_input(GIT_DIFF_LONG_LINE).skip_header(); | ||
|
||
assert_snapshot!(output, @r###" | ||
diff --git a/foobar b/foobar | ||
index 185a33cd5b..123f893935 100755 | ||
--- a/foobar | ||
+++ b/foobar | ||
@@ -14,6 +14,11 @@ function UNDERFLOW_EXEC() { | ||
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX | ||
} | ||
+ | ||
+ | ||
+echo "=== VALIDATE UNDERFLOW" | ||
+/usr/local/bin/check_underflow | ||
+ | ||
# this is an example of the underflow error | ||
echo "=== UNDERFLOW_EXEC" | ||
UNDERFLOW_EXEC -i foobar.yaml | ||
"###); | ||
} | ||
|
||
const GIT_DIFF_SINGLE_HUNK: &str = "\ | ||
commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e | ||
Author: Dan Davison <[email protected]> | ||
|
@@ -3125,4 +3149,30 @@ index 53f98b6..14d6caa 100644 | |
三æäöø€ÆÄÖ〇Øß三 | ||
¶ | ||
"; | ||
|
||
const GIT_DIFF_LONG_LINE: &str = r#"\ | ||
commit XXXXXXXXXXXXXXXXXXXXXXXXX | ||
Author: LUCIANO FURTADO <[email protected]> | ||
Date: Tue Jun 25 14:07:31 2024 -0500 | ||
Ref: https://github.com/dandavison/delta/issues/1760 | ||
diff --git a/foobar b/foobar | ||
index 185a33cd5b..123f893935 100755 | ||
--- a/foobar | ||
+++ b/foobar | ||
@@ -14,6 +14,11 @@ function UNDERFLOW_EXEC() { | ||
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX | ||
} | ||
+ | ||
+ | ||
+echo "=== VALIDATE UNDERFLOW" | ||
+/usr/local/bin/check_underflow | ||
+ | ||
# this is an example of the underflow error | ||
echo "=== UNDERFLOW_EXEC" | ||
UNDERFLOW_EXEC -i foobar.yaml | ||
"#; | ||
} |