Skip to content

Commit e2d91b2

Browse files
Update some unit tests to have the correct context offset lines
1 parent f67767b commit e2d91b2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/bugs.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ teardown_file() {
5151
run printf "%s" "$output"
5252

5353
assert_line --index 1 --partial "renamed:"
54-
assert_line --index 3 --partial "@ language/app.py:4 @"
54+
assert_line --index 3 --partial "@ language/app.py:1 @"
5555
assert_line --index 19 --partial "renamed:"
5656
assert_line --index 21 --partial "@ language/__init__.py:1 @"
5757
assert_line --index 25 --partial "renamed:"
@@ -63,7 +63,7 @@ teardown_file() {
6363
run printf "%s" "$output"
6464

6565
assert_line --index 1 --partial "renamed:"
66-
assert_line --index 3 --partial "@ language/app.py:4 @"
66+
assert_line --index 3 --partial "@ language/app.py:1 @"
6767
assert_line --index 19 --partial "renamed:"
6868
assert_line --index 21 --partial "@ language/__init__.py:1 @"
6969
assert_line --index 25 --partial "renamed:"

test/diff-so-fancy.bats

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ teardown_file() {
187187

188188
@test "Reworked hunks" {
189189
output=$( load_fixture "file-moves" | $diff_so_fancy )
190-
assert_output --partial '@ square.yml:4 @'
191-
assert_output --partial '@ package.json:1 @'
190+
run printf "%s" "$output"
191+
192+
assert_line --index 46 --partial "@ package.json:1 @"
193+
assert_line --index 79 --partial "@ square.yml:1 @"
192194
}
193195

194196
@test "Reworked hunks (noprefix)" {

0 commit comments

Comments
 (0)