git_setup_gettext: plug memory leak
[gitweb.git] / t / t6007-rev-list-cherry-pick-file.sh
index d9827a6389a3c468d5c6a8d8ef82bc361993078f..f0268372d25e562ad8fc5c347b376b88a62d8803 100755 (executable)
@@ -57,7 +57,7 @@ test_expect_success '--left-right' '
        git rev-list --left-right B...C > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 test_expect_success '--count' '
@@ -77,14 +77,14 @@ test_expect_success '--cherry-pick bar does not come up empty' '
        git rev-list --left-right --cherry-pick B...C -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 test_expect_success 'bar does not come up empty' '
        git rev-list --left-right B...C -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 cat >expect <<EOF
@@ -96,14 +96,14 @@ test_expect_success '--cherry-pick bar does not come up empty (II)' '
        git rev-list --left-right --cherry-pick F...E -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 test_expect_success 'name-rev multiple --refs combine inclusive' '
        git rev-list --left-right --cherry-pick F...E -- bar >actual &&
        git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" \
                <actual >actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 cat >expect <<EOF
@@ -115,14 +115,26 @@ test_expect_success 'name-rev --refs excludes non-matched patterns' '
        git rev-list --left-right --cherry-pick F...E -- bar >actual &&
        git name-rev --stdin --name-only --refs="*tags/F" \
                <actual >actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
+'
+
+cat >expect <<EOF
+<tags/F
+EOF
+
+test_expect_success 'name-rev --exclude excludes matched patterns' '
+       git rev-list --left-right --right-only --cherry-pick F...E -- bar >>expect &&
+       git rev-list --left-right --cherry-pick F...E -- bar >actual &&
+       git name-rev --stdin --name-only --refs="*tags/*" --exclude="*E" \
+               <actual >actual.named &&
+       test_cmp expect actual.named
 '
 
 test_expect_success 'name-rev --no-refs clears the refs list' '
        git rev-list --left-right --cherry-pick F...E -- bar >expect &&
        git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" --no-refs --refs="*tags/G" \
                <expect >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -136,7 +148,7 @@ test_expect_success '--cherry-mark' '
        git rev-list --cherry-mark F...E -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 cat >expect <<EOF
@@ -150,7 +162,7 @@ test_expect_success '--cherry-mark --left-right' '
        git rev-list --cherry-mark --left-right F...E -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 cat >expect <<EOF
@@ -161,14 +173,14 @@ test_expect_success '--cherry-pick --right-only' '
        git rev-list --cherry-pick --right-only F...E -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 test_expect_success '--cherry-pick --left-only' '
        git rev-list --cherry-pick --left-only E...F -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 cat >expect <<EOF
@@ -180,7 +192,7 @@ test_expect_success '--cherry' '
        git rev-list --cherry F...E -- bar > actual &&
        git name-rev --stdin --name-only --refs="*tags/*" \
                < actual > actual.named &&
-       test_cmp actual.named expect
+       test_cmp expect actual.named
 '
 
 cat >expect <<EOF
@@ -189,7 +201,7 @@ EOF
 
 test_expect_success '--cherry --count' '
        git rev-list --cherry --count F...E -- bar > actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -198,7 +210,7 @@ EOF
 
 test_expect_success '--cherry-mark --count' '
        git rev-list --cherry-mark --count F...E -- bar > actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -207,7 +219,7 @@ EOF
 
 test_expect_success '--cherry-mark --left-right --count' '
        git rev-list --cherry-mark --left-right --count F...E -- bar > actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success '--cherry-pick with independent, but identical branches' '