]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7407-submodule-foreach.sh
test-dir-iterator: do not assume errno values
[thirdparty/git.git] / t / t7407-submodule-foreach.sh
index 77729ac4aa1873a7e74b59975910ca33a00899d8..706ae762e0ec2fd0103f7f6788eff13ec86ebd67 100755 (executable)
@@ -411,4 +411,14 @@ test_expect_success 'multi-argument command passed to foreach is not shell-evalu
        test_cmp expected actual
 '
 
+test_expect_success 'option-like arguments passed to foreach commands are not lost' '
+       (
+               cd super &&
+               git submodule foreach "echo be --quiet" > ../expected &&
+               git submodule foreach echo be --quiet > ../actual
+       ) &&
+       grep -sq -e "--quiet" expected &&
+       test_cmp expected actual
+'
+
 test_done