Fix errors and shortcomings in t6018 (the rev-parse --namespace test): 1) Some tests were missing &&'s, leading too possibly missing failures 2) Some tests used incorrect commands (didn't test what they were suppoed to) 3) Some test used 'cmp' instead of 'test_cmp' 4) Tests only tested output up to permutation Fix these errors in t6018. Signed-off-by: Ilari Liusvaara <ilari.liusvaara@xxxxxxxxxxx> --- This can be appiled on top of rev-parse --namespace patch v3 or this can be squashed to that patch. t/t6018-rev-list-namespace.sh | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/t/t6018-rev-list-namespace.sh b/t/t6018-rev-list-namespace.sh index 6bb562a..70c8a83 100755 --- a/t/t6018-rev-list-namespace.sh +++ b/t/t6018-rev-list-namespace.sh @@ -14,23 +14,23 @@ commit () { compare () { # Split arguments on whitespace. - git $1 $2 | sort >expected && - git $1 $3 | sort >actual && - cmp expected actual + git $1 $2 >expected && + git $1 $3 >actual && + test_cmp expected actual } test_expect_success 'setup' ' commit master && - git checkout -b subspace/one master + git checkout -b subspace/one master && commit one && - git checkout -b subspace/two master + git checkout -b subspace/two master && commit two && - git checkout -b subspace-x master + git checkout -b subspace-x master && commit subspace-x && - git checkout -b other/three master + git checkout -b other/three master && commit three && - git checkout -b someref master + git checkout -b someref master && commit some && git checkout master && commit master2 @@ -68,7 +68,7 @@ test_expect_success 'rev-parse --namespace=heads/someref master' ' test_expect_success 'rev-parse --namespace=heads' ' - compare rev-parse "subspace/one subspace/two other/three subspace-x master someref" "--namespace=heads" + compare rev-parse "master other/three someref subspace-x subspace/one subspace/two" "--namespace=heads" ' @@ -92,19 +92,19 @@ test_expect_success 'rev-list --namespace=heads/subspace' ' test_expect_success 'rev-list --namespace=heads/someref master' ' - compare rev-parse "master" "--namespace=heads/someref master" + compare rev-list "master" "--namespace=heads/someref master" ' test_expect_success 'rev-list --namespace=heads/subspace --namespace=heads/other' ' - compare rev-parse "subspace/one subspace/two other/three" "--namespace=heads/subspace --namespace=heads/other" + compare rev-list "subspace/one subspace/two other/three" "--namespace=heads/subspace --namespace=heads/other" ' test_expect_success 'rev-list --namespace=heads' ' - compare rev-parse "subspace/one subspace/two other/three subspace-x master someref" "--namespace=heads" + compare rev-list "master other/three someref subspace-x subspace/one subspace/two" "--namespace=heads" ' -- 1.6.6.199.gff4b0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html