mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-05 16:15:41 -06:00
fixed some bats tests (#698)
This commit is contained in:
@@ -337,7 +337,13 @@ teardown() {
|
||||
dolt branch test
|
||||
run dolt checkout test
|
||||
[ "$status" -eq 0 ]
|
||||
skip "behavior ambiguous right now. should reset test table and switch to branch per git"
|
||||
# Checks out branch "test" table "test" unaltered. Matches git behavior for:
|
||||
#
|
||||
# git init
|
||||
# git commit --allow-empty -m "create"
|
||||
# touch test
|
||||
# git branch test
|
||||
# git checkout test
|
||||
}
|
||||
|
||||
@test "make a change on a different branch, commit, and merge to master" {
|
||||
|
||||
@@ -41,7 +41,6 @@ teardown() {
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" =~ "wrong number of arguments" ]] || false
|
||||
run dolt config --global --add
|
||||
skip "dolt config --global --add with no name value pair currently succeeds"
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" =~ "wrong number of arguments" ]] || false
|
||||
}
|
||||
@@ -111,9 +110,24 @@ teardown() {
|
||||
run dolt config --local --get test
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "local" ]
|
||||
# will list both global and local values in list output
|
||||
run dolt config --list
|
||||
[ "$status" -eq 0 ]
|
||||
skip "list option in config does not respect local overrides"
|
||||
[[ "$output" =~ "test = local" ]] || false
|
||||
[[ ! "$output" =~ "test = global" ]] || false
|
||||
[[ "$output" =~ "test = global" ]] || false
|
||||
# will get the local value explicitly
|
||||
run dolt config --get --local test
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "local" ]] || false
|
||||
[[ ! "$output" =~ "global" ]] || false
|
||||
# will get the global value explicitly
|
||||
run dolt config --get --global test
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "global" ]] || false
|
||||
[[ ! "$output" =~ "local" ]] || false
|
||||
# will get the local value implicitly
|
||||
run dolt config --get test
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "local" ]] || false
|
||||
[[ ! "$output" =~ "global" ]] || false
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ func getOperation(dEnv *env.DoltEnv, setCfgTypes *set.StrSet, args []string, pri
|
||||
}
|
||||
|
||||
func addOperation(dEnv *env.DoltEnv, setCfgTypes *set.StrSet, args []string, usage cli.UsagePrinter) int {
|
||||
if len(args)%2 != 0 {
|
||||
if len(args) == 0 || len(args)%2 != 0 {
|
||||
cli.Println("error: wrong number of arguments")
|
||||
usage()
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user