Skip to content

Commit 790afa7

Browse files
Update tests for color coded file add/deletes
1 parent 32b3e3d commit 790afa7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/diff-so-fancy.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ if begin"
9999
@test "Empty file add" {
100100
output=$( load_fixture "add_empty_file" | $diff_so_fancy )
101101
run printf "%s" "$output"
102-
assert_line --index 5 --partial "added: empty_file.txt"
102+
assert_line --index 5 --regexp "added:.*empty_file.txt"
103103
}
104104

105105
@test "Empty file delete" {
106106
output=$( load_fixture "remove_empty_file" | $diff_so_fancy )
107107
run printf "%s" "$output"
108-
assert_line --index 5 --partial "deleted: empty_file.txt"
108+
assert_line --index 5 --regexp "deleted:.*empty_file.txt"
109109
}

test/header_clean.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ output=$( load_fixture "file-moves" | $diff_so_fancy )
1616
}
1717

1818
@test "header_clean 'added:'" {
19-
assert_output --partial 'added: hello.txt'
19+
assert_output --regexp 'added:.*hello.txt'
2020
}
2121

2222
@test "header_clean 'modified:'" {
2323
assert_output --partial 'modified: appveyor.yml'
2424
}
2525

2626
@test "header_clean 'deleted:'" {
27-
assert_output --partial 'deleted: circle.yml'
27+
assert_output --regexp 'deleted:.*circle.yml'
2828
}
2929

3030
@test "header_clean permission changes" {

0 commit comments

Comments
 (0)