mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-23 18:58:50 -06:00
Add BATS tests for call dolt_branch -m
This commit is contained in:
@@ -192,3 +192,13 @@ SQL
|
||||
[ "$status" -eq 0 ]
|
||||
[[ ! "$output" =~ "origin/b1" ]] || false
|
||||
}
|
||||
|
||||
@test "sql-branch: CALL DOLT_BRANCH -m on session active branch (dolt sql)" {
|
||||
dolt branch other
|
||||
echo "call dolt_checkout('other'); call dolt_branch('-m', 'other', 'newOther')" | dolt sql
|
||||
run dolt branch
|
||||
[ $status -eq 0 ]
|
||||
[[ "$output" =~ "newOther" ]] || false
|
||||
[[ "$output" =~ "main" ]] || false
|
||||
[[ ! "$output" =~ "other" ]] || false
|
||||
}
|
||||
@@ -1924,3 +1924,15 @@ behavior:
|
||||
[ $status -eq 0 ]
|
||||
[[ "$output" =~ "0x1C4C4E338AD7442184509D5182816AC3" ]] || false
|
||||
}
|
||||
|
||||
@test "sql-server: CALL DOLT_BRANCH -m on session active branch (dolt sql-server)" {
|
||||
cd repo1
|
||||
dolt branch other
|
||||
start_sql_server
|
||||
dolt sql-client -P $PORT -u dolt --use-db repo1 -q "call dolt_checkout('other'); call dolt_branch('-m', 'other', 'newOther')"
|
||||
run dolt branch
|
||||
[ $status -eq 0 ]
|
||||
[[ "$output" =~ "newOther" ]] || false
|
||||
[[ "$output" =~ "main" ]] || false
|
||||
[[ ! "$output" =~ "other" ]] || false
|
||||
}
|
||||
Reference in New Issue
Block a user