]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t1502-rev-parse-parseopt.sh
Merge branch 'maint-1.7.2' into maint
[git.git] / t / t1502-rev-parse-parseopt.sh
index 434679585555c660f76f42a82f2ff84df3119f01..b3195c47070b35d555f8cfae90497a2d00d10ca7 100755 (executable)
@@ -81,4 +81,22 @@ test_expect_success 'test --parseopt --keep-dashdash' '
        test_cmp expect output
 '
 
+cat >expect <<EOF
+set -- --foo -- '--' 'arg' '--spam=ham'
+EOF
+
+test_expect_success 'test --parseopt --keep-dashdash --stop-at-non-option with --' '
+       git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- --foo -- arg --spam=ham <optionspec >output &&
+       test_cmp expect output
+'
+
+cat > expect <<EOF
+set -- --foo -- 'arg' '--spam=ham'
+EOF
+
+test_expect_success 'test --parseopt --keep-dashdash --stop-at-non-option without --' '
+       git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- --foo arg --spam=ham <optionspec >output &&
+       test_cmp expect output
+'
+
 test_done