mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-21 19:39:04 -05:00
update local and remote tests for dolt blame to be more accurate
This commit is contained in:
@@ -61,12 +61,13 @@ SQL
|
||||
run dolt blame blame_test
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
[[ "$output" =~ "1".*"Thomas Foolery".*"create blame_test table" ]] || false
|
||||
[[ "${lines[1]}" =~ "pk".*"commit".*"commit_date".*"committer".*"email".*"message" ]] || false
|
||||
[[ "$output" =~ "1 |".+"|".+"| Thomas Foolery, | bats-1@email.fake | create blame_test table |" ]] || false
|
||||
[[ ! "$output" =~ "Richard Tracy" ]] || false
|
||||
[[ ! "$output" =~ "add richard to blame_test" ]] || false
|
||||
[[ "$output" =~ "2".*"Harry Wombat".*"replace richard" ]] || false
|
||||
[[ "$output" =~ "3".*"Johnny Moolah".*"add more people" ]] || false
|
||||
[[ "$output" =~ "4".*"Johnny Moolah".*"add more people" ]] || false
|
||||
[[ "$output" =~ "2 |".+"|".+"| Harry Wombat, | bats-3@email.fake | replace richard with harry |" ]] || false
|
||||
[[ "$output" =~ "3 |".+"|".+"| Johnny Moolah, | bats-4@email.fake | add more people to blame_test |" ]] || false
|
||||
[[ "$output" =~ "4 |".+"|".+"| Johnny Moolah, | bats-4@email.fake | add more people to blame_test |" ]] || false
|
||||
}
|
||||
|
||||
@test "blame: blames HEAD when commit ref omitted" {
|
||||
|
||||
@@ -122,15 +122,11 @@ teardown() {
|
||||
start_sql_server defaultDB
|
||||
run dolt --user dolt blame test
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "1".*"insert initial value into test" ]] || false
|
||||
[[ "$output" =~ "2".*"insert more values into test" ]] || false
|
||||
[[ "$output" =~ "3".*"insert more values into test" ]] || false
|
||||
export out="$output"
|
||||
stop_sql_server 1
|
||||
|
||||
run dolt blame test
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "1".*"insert initial value into test" ]] || false
|
||||
[[ "$output" =~ "2".*"insert more values into test" ]] || false
|
||||
[[ "$output" =~ "3".*"insert more values into test" ]] || false
|
||||
[[ "$output" = $out ]] || false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user